/* ==========================================================================
   VIBE — Componentes Visuais Oficiais
   Sidebar, Seta Integrada, Marca, Navegação, Topbar, Cards e Módulo de Operadores
   ========================================================================== */

/* ==========================================================================
   1. Seta de Recolhimento Integrada na Borda Direita da Sidebar
   ========================================================================== */
.sidebar-edge-toggle {
  position: absolute;
  top: 36px;
  right: -15px; /* Centralizada sobre a borda para diâmetro de 30px */
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--vibe-navy-primary);
  border: 1.5px solid rgba(40, 216, 232, 0.45);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 120;
  box-shadow: 0 2px 10px rgba(13, 25, 43, 0.45);
  transition: all var(--vibe-transition-fast);
  outline: none;
}

.sidebar-edge-toggle:hover {
  background: var(--vibe-navy-secondary);
  border-color: var(--vibe-cyan-accent);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(40, 216, 232, 0.45);
  transform: scale(1.1);
}

.sidebar-edge-toggle:focus-visible {
  border-color: var(--vibe-cyan-accent);
  box-shadow: 0 0 0 2px rgba(40, 216, 232, 0.45), 0 2px 10px rgba(13, 25, 43, 0.45);
}

.edge-toggle-arrow {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  transition: transform var(--vibe-transition-layout);
  transform: rotate(0deg); /* Aponta para a esquerda (<) quando expandida */
}

.vibe-sidebar.collapsed .edge-toggle-arrow {
  transform: rotate(180deg); /* Aponta para a direita (>) quando recolhida */
}

/* ==========================================================================
   2. Cabeçalho da Marca na Sidebar (Espaço Vertical e Hierarquia Nobre)
   ========================================================================== */
.sidebar-brand-container {
  padding: 20px 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--vibe-navy-border);
  position: relative;
  min-height: 94px;
}

.brand-icon-box {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--vibe-radius-md);
  background: linear-gradient(135deg, rgba(23, 42, 67, 0.95) 0%, rgba(13, 25, 43, 0.98) 100%);
  border: 1px solid rgba(40, 216, 232, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform var(--vibe-transition-normal);
}

.brand-icon-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  transition: opacity var(--vibe-transition-fast), transform var(--vibe-transition-fast);
}

/* GESTÃO INTELIGENTE DE TURNOS */
.brand-descriptor {
  font-size: 0.8125rem; /* 13px */
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-cyan-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0;
  line-height: 1.25;
  white-space: normal;
}

/* Slogan */
.brand-slogan-text {
  font-size: 0.75rem; /* 12px */
  color: var(--vibe-text-muted);
  margin-top: 5px;
  font-style: italic;
  line-height: 1.35;
  white-space: normal;
}

/* Modificações no Modo Recolhido */
.vibe-sidebar.collapsed .sidebar-brand-container {
  padding: 20px 10px;
  justify-content: center;
  min-height: 86px;
}

.vibe-sidebar.collapsed .brand-icon-box {
  width: 48px;
  height: 48px;
  margin: 0 auto;
}

.vibe-sidebar.collapsed .brand-icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.vibe-sidebar.collapsed .brand-text-block {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ==========================================================================
   3. Card de Cobertura das Equipes na Sidebar (Compacto e Oficial)
   ========================================================================== */
.sidebar-coverage-card {
  margin: 10px 10px 6px;
  padding: 9px 8px 8px;
  background: rgba(23, 42, 67, 0.55);
  border: 1px solid rgba(40, 216, 232, 0.22);
  border-radius: var(--vibe-radius-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.sidebar-coverage-card:hover {
  background: rgba(23, 42, 67, 0.78);
  border-color: rgba(40, 216, 232, 0.45);
}

.vibe-sidebar.collapsed .sidebar-coverage-card {
  display: none !important;
}

.coverage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.coverage-header-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.coverage-header-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--vibe-radius-sm);
  background: rgba(40, 216, 232, 0.12);
  border: 1px solid rgba(40, 216, 232, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--vibe-cyan-accent);
}

.coverage-header-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coverage-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.coverage-title {
  font-size: 0.6875rem; /* 11px */
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-inverse);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coverage-subtitle {
  font-size: 0.59375rem; /* 9.5px */
  color: var(--vibe-text-muted);
  margin: 1px 0 0;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coverage-info-trigger {
  background: transparent;
  border: none;
  padding: 2px;
  color: var(--vibe-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.coverage-info-trigger:hover {
  color: var(--vibe-cyan-accent);
}

.coverage-info-trigger svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Grade dos 5 turnos horizontais compactos */
.coverage-shifts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3.5px;
  width: 100%;
}

.coverage-shift-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(14, 27, 44, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--vibe-radius-sm);
  padding: 5px 3.5px 4.5px;
  text-align: center;
  transition: all var(--vibe-transition-fast);
  min-width: 0;
  overflow: hidden;
}

.coverage-shift-box:hover {
  background: rgba(23, 42, 67, 0.95);
  border-color: rgba(40, 216, 232, 0.4);
  transform: translateY(-1px);
}

.coverage-shift-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

/* Badges com brilho (glowing) dos Turnos A-E */
.coverage-shift-badge {
  width: 16px;
  height: 16px;
  border-radius: 3.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem; /* 10px */
  font-weight: var(--vibe-font-bold);
  line-height: 1;
  flex-shrink: 0;
}

.badge-a {
  background: #2563EB;
  color: #FFFFFF;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.55);
  border: 1px solid rgba(96, 165, 250, 0.6);
}

.badge-b {
  background: #F59E0B;
  color: #1E293B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.6);
}

.badge-c {
  background: #8B5CF6;
  color: #FFFFFF;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.55);
  border: 1px solid rgba(192, 132, 252, 0.6);
}

.badge-d {
  background: #EF4444;
  color: #FFFFFF;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.6);
}

.badge-e {
  background: #10B981;
  color: #FFFFFF;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.55);
  border: 1px solid rgba(52, 211, 153, 0.6);
}

/* Fração de disponibilidade */
.coverage-shift-ratio {
  font-size: 0.625rem; /* 10px */
  font-weight: var(--vibe-font-bold);
  font-family: var(--vibe-font-mono);
  line-height: 1;
}

.ratio-complete {
  color: #38BDF8;
}

.ratio-warning {
  color: #FBBF24;
}

.ratio-critical {
  color: #F87171;
}

.ratio-insufficient {
  color: #94A3B8;
}

/* Nome do turno */
.coverage-shift-name {
  font-size: 0.5625rem; /* 9px */
  font-weight: var(--vibe-font-medium);
  color: var(--vibe-text-inverse);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

/* Barra de progresso da cobertura */
.coverage-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--vibe-radius-full);
  overflow: hidden;
  width: 100%;
}

.coverage-progress-bar {
  height: 100%;
  border-radius: var(--vibe-radius-full);
  transition: width 0.3s ease;
}

.bar-a {
  background: linear-gradient(90deg, #0284C7, #38BDF8);
}

.bar-b {
  background: linear-gradient(90deg, #D97706, #FBBF24);
}

.bar-c {
  background: linear-gradient(90deg, #7C3AED, #C084FC);
}

.bar-d {
  background: linear-gradient(90deg, #DC2626, #F87171);
}

.bar-e {
  background: linear-gradient(90deg, #059669, #34D399);
}

.bar-insufficient {
  background: #64748B;
}

/* Indicador de Status Compacto */
.coverage-status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 1px 2px;
  border-radius: 999px;
  font-size: 0.5rem; /* 8px */
  font-weight: var(--vibe-font-semibold);
  line-height: 1.1;
  width: 100%;
  overflow: hidden;
}

.coverage-status-tag svg {
  width: 7.5px;
  height: 7.5px;
  flex-shrink: 0;
  stroke-width: 2.5;
  stroke: currentColor;
  fill: none;
}

.status-tag-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-complete {
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #22D3EE;
}

.tag-warning {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
}

.tag-critical {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
}

.tag-insufficient {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #94A3B8;
}

/* ==========================================================================
   4. Navegação Principal e Tooltips no Modo Recolhido
   ========================================================================== */
.sidebar-nav-scroll {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-scroll::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(221, 230, 240, 0.12);
  border-radius: 4px;
}

.nav-category {
  font-size: 0.65625rem; /* 10.5px */
  font-weight: var(--vibe-font-bold);
  color: #6C7F99;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 10px 4px;
  user-select: none;
}

.vibe-sidebar.collapsed .nav-category {
  display: none;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--vibe-radius-md);
  color: #B2C3D7;
  text-decoration: none;
  font-size: var(--vibe-text-sm);
  font-weight: var(--vibe-font-medium);
  transition: all var(--vibe-transition-fast);
  position: relative;
  outline: none;
}

.nav-link-item:hover {
  background: var(--vibe-navy-secondary);
  color: #FFFFFF;
}

.nav-link-item.active {
  background: var(--vibe-navy-secondary);
  color: #FFFFFF;
  font-weight: var(--vibe-font-semibold);
  box-shadow: inset 3px 0 0 var(--vibe-cyan-accent);
}

.nav-link-item:focus-visible {
  box-shadow: 0 0 0 2px var(--vibe-cyan-accent);
}

.nav-icon-wrapper {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon-wrapper svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.nav-item-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vibe-sidebar.collapsed .nav-item-text,
.vibe-sidebar.collapsed .nav-item-tag {
  display: none;
}

.nav-item-tag {
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-bold);
  padding: 2px 7px;
  border-radius: var(--vibe-radius-full);
}

.tag-cyan {
  background: var(--vibe-cyan-subtle);
  color: var(--vibe-cyan-accent);
  border: 1px solid var(--vibe-cyan-border);
}

.tag-blue {
  background: var(--vibe-blue-subtle);
  color: var(--vibe-blue-accent);
  border: 1px solid rgba(71, 138, 255, 0.25);
}

.tag-muted {
  background: rgba(255, 255, 255, 0.08);
  color: #9FB2CA;
}

/* Tooltips no Modo Recolhido */
.vibe-sidebar.collapsed .nav-link-item {
  justify-content: center;
  padding: 10px;
}

.vibe-sidebar.collapsed .nav-link-item:hover::after,
.vibe-sidebar.collapsed .nav-link-item:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--vibe-navy-secondary);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: var(--vibe-radius-sm);
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-medium);
  white-space: nowrap;
  border: 1px solid rgba(40, 216, 232, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  pointer-events: none;
}

/* ==========================================================================
   5. Topbar Executiva
   ========================================================================== */
.topbar-left-zone {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--vibe-text-xs);
  color: var(--vibe-text-secondary);
}

.breadcrumb-root {
  font-weight: var(--vibe-font-medium);
  color: var(--vibe-text-secondary);
}

.breadcrumb-separator {
  color: #B2C1D2;
}

.breadcrumb-current {
  font-weight: var(--vibe-font-semibold);
  color: var(--vibe-text-primary);
}

.topbar-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--vibe-radius-full);
  background-color: var(--vibe-status-success-bg);
  border: 1px solid var(--vibe-status-success-border);
  color: var(--vibe-status-success-text);
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-bold);
  letter-spacing: 0.03em;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--vibe-status-success-text);
}

.topbar-right-zone {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-datetime {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--vibe-text-xs);
  color: var(--vibe-text-secondary);
  font-family: var(--vibe-font-mono);
}

.topbar-divider {
  width: 1px;
  height: 20px;
  background-color: var(--vibe-border);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--vibe-radius-md);
  background-color: var(--vibe-bg-workspace);
  border: 1px solid var(--vibe-border);
  position: relative;
}

.user-meta-info {
  display: flex;
  flex-direction: column;
}

.user-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--vibe-navy-primary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-bold);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.user-meta-name {
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  color: var(--vibe-text-primary);
  line-height: 1.2;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta-role {
  font-size: 0.65rem;
  color: var(--vibe-text-secondary);
  line-height: 1.1;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #DC2626;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
  line-height: 1;
}

.topbar-logout-btn:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.topbar-logout-btn svg {
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* ==========================================================================
   6. Botões, Indicadores e Estilos Globais de Ação
   ========================================================================== */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title-group h1 {
  font-size: 1.375rem; /* 22px */
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.page-title-group p {
  font-size: var(--vibe-text-xs);
  color: var(--vibe-text-secondary);
  margin-top: 3px;
}

.page-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--vibe-radius-md);
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  outline: none;
}

.action-pill-btn:hover {
  background-color: var(--vibe-surface-hover);
  border-color: #CAD6E4;
}

.action-pill-btn.primary {
  background: #0066EE;
  background: var(--vibe-blue-accent);
  color: #FFFFFF;
  border: none;
  border-radius: var(--vibe-radius-full);
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(71, 138, 255, 0.35);
}

.action-pill-btn.primary:hover {
  background: #0052CC;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(71, 138, 255, 0.45);
}

.action-pill-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ==========================================================================
   7. Módulo de Operadores & Equipe (Cadastro, Edição, Filtros e Lista)
   ========================================================================== */
.operators-view-container {
  display: flex;
  flex-direction: column;
  gap: var(--vibe-space-4);
}

/* Barra de Filtros e Pesquisa */
.operators-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px rgba(13, 25, 43, 0.03);
}

.operators-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  background: #F8FAFC;
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-full);
  padding: 8px 16px;
  transition: border-color var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast);
}

.operators-search-box:focus-within {
  border-color: #BFDBFE;
  box-shadow: 0 0 0 2px rgba(71, 138, 255, 0.2);
  background: #FFFFFF;
}

.operators-search-box svg {
  width: 15px;
  height: 15px;
  stroke: var(--vibe-text-secondary);
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
}

.operators-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.8125rem;
  color: var(--vibe-text-primary);
  width: 100%;
}

.operators-search-box input::placeholder {
  color: var(--vibe-text-secondary);
}

.operators-filter-groups {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 7px 14px;
  border-radius: var(--vibe-radius-full);
  border: 1px solid var(--vibe-border);
  background: #F8FAFC;
  color: var(--vibe-text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
}

.filter-select:hover {
  background: #FFFFFF;
  border-color: #CAD6E4;
}

.filter-select:focus {
  border-color: #BFDBFE;
  box-shadow: 0 0 0 2px rgba(71, 138, 255, 0.2);
  background: #FFFFFF;
}

/* Banner de Mensagens (Sucesso / Erro / Cancelamento) */
.vibe-alert-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: var(--vibe-radius-md);
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  transition: all var(--vibe-transition-fast);
}

.vibe-alert-banner.show {
  display: flex;
}

.vibe-alert-banner.success {
  background: var(--vibe-status-success-bg);
  color: var(--vibe-status-success-text);
  border: 1px solid var(--vibe-status-success-border);
}

.vibe-alert-banner.error {
  background: var(--vibe-status-danger-bg);
  color: var(--vibe-status-danger-text);
  border: 1px solid var(--vibe-status-danger-border);
}

.vibe-alert-banner.info {
  background: #EDF3FA;
  color: var(--vibe-text-primary);
  border: 1px solid #CAD6E4;
}

.alert-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 14px;
  line-height: 1;
}

/* Tabela de Operadores */
.premium-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  box-shadow: var(--vibe-shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-header-bar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--vibe-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FCFDFE;
}

.card-title-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-heading-title {
  font-size: var(--vibe-text-md);
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  letter-spacing: -0.01em;
}

.card-count-badge {
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-semibold);
  padding: 1px 7px;
  border-radius: var(--vibe-radius-full);
  background: var(--vibe-bg-workspace);
  color: var(--vibe-text-secondary);
  border: 1px solid var(--vibe-border);
}

.vibe-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--vibe-text-xs);
}

.vibe-data-table th {
  padding: 10px 16px;
  background: #F8FAFD;
  color: var(--vibe-text-secondary);
  font-weight: var(--vibe-font-semibold);
  font-size: var(--vibe-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--vibe-border);
  white-space: nowrap;
}

.vibe-data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--vibe-border-subtle);
  color: var(--vibe-text-primary);
  vertical-align: middle;
}

.vibe-data-table tbody tr:hover {
  background-color: var(--vibe-surface-hover);
}

.operator-photo-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #E2EAF4;
  border: 1px solid var(--vibe-border);
  display: block;
}

.operator-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--vibe-navy-secondary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-bold);
}

.status-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--vibe-radius-full);
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-semibold);
}

.status-badge-pill.active {
  background: var(--vibe-status-success-bg);
  color: var(--vibe-status-success-text);
  border: 1px solid var(--vibe-status-success-border);
}

.status-badge-pill.inactive {
  background: #F1F4F9;
  color: var(--vibe-text-secondary);
  border: 1px solid var(--vibe-border);
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-action-btn {
  padding: 4px 8px;
  border-radius: var(--vibe-radius-sm);
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-medium);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.row-action-btn:hover {
  background: var(--vibe-surface-hover);
  border-color: #CAD6E4;
}

.row-action-btn.edit {
  color: var(--vibe-blue-accent);
}

.row-action-btn.delete {
  color: #B3261E;
  padding: 4px 6px;
}

.row-action-btn.delete:hover {
  background: var(--vibe-status-danger-bg);
  border-color: var(--vibe-status-danger-border);
  color: var(--vibe-status-danger-text);
}

.row-action-btn.delete svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Grupo de Alternância: Modo Lista vs Modo Cartões */
.view-mode-toggle-group {
  display: inline-flex;
  align-items: center;
  background: var(--vibe-bg-workspace);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  padding: 2px;
  gap: 2px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: none;
  background: transparent;
  color: var(--vibe-text-secondary);
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-semibold);
  border-radius: var(--vibe-radius-sm);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
}

.view-toggle-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.view-toggle-btn:hover {
  color: var(--vibe-text-primary);
}

.view-toggle-btn.active {
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  box-shadow: 0 1px 3px rgba(13, 25, 43, 0.08);
}

/* Grade de Cartões de Operadores (Modo Cartões Padronizado) */
.operators-cards-view {
  padding: 18px 20px;
}

.operators-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.operator-card-item {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(13, 25, 43, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast), border-color var(--vibe-transition-fast);
}

.operator-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 25, 43, 0.08);
  border-color: #CAD6E4;
}

/* ==========================================================================
   Cores Suaves dos Operadores por Turno-Base (Consistentes com Painel de Turnos)
   Turno A: Fundo #EFF6FF, Borda #BFDBFE
   Turno B: Fundo #F0FDF4, Borda #BBF7D0
   Turno C: Fundo #FAF5FF, Borda #E9D5FF
   Turno D: Fundo #FEFCE8, Borda #FEF08A
   Turno E: Fundo #FFF1F2, Borda #FECDD3
   ========================================================================== */

/* 1. Modo Cartões (Cards dos Operadores) */
.operator-card-item.shift-card-a,
.operator-card-item[data-shift="Turno A"] {
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.operator-card-item.shift-card-b,
.operator-card-item[data-shift="Turno B"] {
  background: #F0FDF4;
  border-color: #BBF7D0;
}
.operator-card-item.shift-card-c,
.operator-card-item[data-shift="Turno C"] {
  background: #FAF5FF;
  border-color: #E9D5FF;
}
.operator-card-item.shift-card-d,
.operator-card-item[data-shift="Turno D"] {
  background: #FEFCE8;
  border-color: #FEF08A;
}
.operator-card-item.shift-card-e,
.operator-card-item[data-shift="Turno E"] {
  background: #FFF1F2;
  border-color: #FECDD3;
}

/* Hover nos cartões com realce das cores oficiais */
.operator-card-item.shift-card-a:hover,
.operator-card-item[data-shift="Turno A"]:hover {
  border-color: #93C5FD;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}
.operator-card-item.shift-card-b:hover,
.operator-card-item[data-shift="Turno B"]:hover {
  border-color: #86EFAC;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.08);
}
.operator-card-item.shift-card-c:hover,
.operator-card-item[data-shift="Turno C"]:hover {
  border-color: #D8B4FE;
  box-shadow: 0 6px 18px rgba(147, 51, 234, 0.08);
}
.operator-card-item.shift-card-d:hover,
.operator-card-item[data-shift="Turno D"]:hover {
  border-color: #FDE047;
  box-shadow: 0 6px 18px rgba(202, 138, 4, 0.08);
}
.operator-card-item.shift-card-e:hover,
.operator-card-item[data-shift="Turno E"]:hover {
  border-color: #FDA4AF;
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.08);
}

/* 2. Modo Lista (Linhas da Tabela de Operadores) */
.operators-table-view tbody tr.shift-row-a,
.operators-table-view tbody tr[data-shift="Turno A"] {
  background: #EFF6FF;
}
.operators-table-view tbody tr.shift-row-b,
.operators-table-view tbody tr[data-shift="Turno B"] {
  background: #F0FDF4;
}
.operators-table-view tbody tr.shift-row-c,
.operators-table-view tbody tr[data-shift="Turno C"] {
  background: #FAF5FF;
}
.operators-table-view tbody tr.shift-row-d,
.operators-table-view tbody tr[data-shift="Turno D"] {
  background: #FEFCE8;
}
.operators-table-view tbody tr.shift-row-e,
.operators-table-view tbody tr[data-shift="Turno E"] {
  background: #FFF1F2;
}

/* Hover suave nas linhas da tabela de operadores */
.operators-table-view tbody tr.shift-row-a:hover,
.operators-table-view tbody tr[data-shift="Turno A"]:hover {
  background: #DBEAFE;
}
.operators-table-view tbody tr.shift-row-b:hover,
.operators-table-view tbody tr[data-shift="Turno B"]:hover {
  background: #DCFCE7;
}
.operators-table-view tbody tr.shift-row-c:hover,
.operators-table-view tbody tr[data-shift="Turno C"]:hover {
  background: #F3E8FF;
}
.operators-table-view tbody tr.shift-row-d:hover,
.operators-table-view tbody tr[data-shift="Turno D"]:hover {
  background: #FEF9C3;
}
.operators-table-view tbody tr.shift-row-e:hover,
.operators-table-view tbody tr[data-shift="Turno E"]:hover {
  background: #FFE4E6;
}

.op-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
}

.operator-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--vibe-border);
  flex-shrink: 0;
}

.operator-card-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vibe-navy-secondary) 0%, var(--vibe-navy-primary) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.op-card-title-group {
  flex: 1;
  min-width: 0;
}

.op-card-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.op-card-matricula {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
  font-family: var(--vibe-font-mono);
  margin-top: 2px;
  display: block;
}

.op-card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--vibe-border-subtle);
  border-bottom: 1px solid var(--vibe-border-subtle);
  margin-bottom: 12px;
  font-size: var(--vibe-text-xs);
}

.op-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.op-card-meta-row .meta-label {
  color: var(--vibe-text-secondary);
  font-size: var(--vibe-text-2xs);
  font-weight: 500;
  flex-shrink: 0;
}

.op-card-meta-row .meta-value {
  color: var(--vibe-text-primary);
  text-align: right;
  font-size: var(--vibe-text-xs);
}

.op-card-contact-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.card-contact-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--vibe-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  background: #F8FAFC;
  border: 1px solid var(--vibe-border);
  color: var(--vibe-navy-primary);
  transition: all var(--vibe-transition-fast);
  cursor: pointer;
}

.card-contact-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.card-contact-btn:hover:not(.disabled) {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.card-contact-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #F8FAFC;
}

.op-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}

.op-card-footer .row-action-btn.edit {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-full);
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibe-navy-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
}

.op-card-footer .row-action-btn.edit:hover {
  background: var(--vibe-bg-workspace);
  border-color: #CAD6E4;
}

.op-card-footer .row-action-btn.delete {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--vibe-radius-full);
  padding: 5px 8px;
  color: var(--vibe-text-secondary);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.op-card-footer .row-action-btn.delete:hover {
  background: #FFF1F0;
  border-color: #FFA39E;
  color: #D32029;
}

/* Modal de Cadastro / Edição */
.vibe-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 25, 43, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vibe-modal-backdrop.open,
.vibe-modal-backdrop.show {
  display: flex;
}

.vibe-modal-dialog {
  background: var(--vibe-surface);
  border-radius: 16px;
  border: 1px solid var(--vibe-border);
  box-shadow: 0 10px 30px rgba(13, 25, 43, 0.15);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--vibe-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.125rem; /* 18px */
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
}

.modal-close-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--vibe-text-secondary);
  font-size: 1.25rem;
  line-height: 1;
}

.modal-form-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field-group label {
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  color: var(--vibe-text-primary);
}

.form-field-group label .required-star {
  color: var(--vibe-status-danger-text);
  margin-left: 2px;
}

.form-field-group input,
.form-field-group select {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  border-radius: var(--vibe-radius-md);
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  font-family: var(--vibe-font-sans);
  font-size: var(--vibe-text-xs);
  line-height: 1.4;
  outline: none;
  transition: border-color var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast);
  appearance: auto;
  -webkit-appearance: auto;
}

.form-field-group input:focus,
.form-field-group select:focus {
  border-color: var(--vibe-cyan-accent);
  box-shadow: 0 0 0 2px var(--vibe-cyan-glow);
}

.field-error-text {
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-status-danger-text);
  display: none;
}

.form-field-group.has-error input,
.form-field-group.has-error select {
  border-color: var(--vibe-status-danger-text);
}

.form-field-group.has-error .field-error-text {
  display: block;
}

/* Divisores discretos entre os três grupos de campos */
.form-group-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}

.form-group-section:not(:last-child) {
  border-bottom: 1px solid var(--vibe-border-subtle);
  padding-bottom: 14px;
}

.form-group-header {
  font-size: 0.6875rem; /* 11px */
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botão de Alternância de Situação Funcional (Ativo / Inativo) */
.status-toggle-wrapper {
  display: flex;
  align-items: center;
  height: 38px;
}

.status-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 8px 16px;
  border-radius: var(--vibe-radius-md);
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  font-family: var(--vibe-font-sans);
  cursor: pointer;
  outline: none;
  transition: all var(--vibe-transition-fast);
  border: 1.5px solid transparent;
  user-select: none;
}

/* Estado Ativo: fundo verde suave corporativo, borda e texto em verde de sucesso */
.status-toggle-btn.status-active {
  background: var(--vibe-status-success-bg);
  border-color: var(--vibe-status-success-border);
  color: var(--vibe-status-success-text);
  box-shadow: 0 1px 2px rgba(14, 124, 89, 0.08);
}

.status-toggle-btn.status-active:hover {
  background: #DCF7ED;
  border-color: #9DE9CE;
}

.status-toggle-btn.status-active:focus-visible {
  box-shadow: 0 0 0 2px var(--vibe-cyan-accent), 0 1px 2px rgba(14, 124, 89, 0.08);
}

/* Estado Inativo: fundo neutro discreto, borda cinza-azulada e texto secundário */
.status-toggle-btn.status-inactive {
  background: #F1F4F9;
  border-color: #D3DFEC;
  color: #55667D;
}

.status-toggle-btn.status-inactive:hover {
  background: #E6ECF5;
  border-color: #BCCFDF;
  color: var(--vibe-text-primary);
}

.status-toggle-btn.status-inactive:focus-visible {
  box-shadow: 0 0 0 2px var(--vibe-cyan-accent);
}

.status-toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all var(--vibe-transition-fast);
}

.status-toggle-btn.status-active .status-toggle-dot {
  background: var(--vibe-status-success-text);
  box-shadow: 0 0 6px var(--vibe-status-success-text);
}

.status-toggle-btn.status-inactive .status-toggle-dot {
  background: #8A99AC;
  box-shadow: none;
}

/* Upload e Preview da Foto */
.photo-upload-zone {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--vibe-bg-workspace);
  border: 1px dashed var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
}

.photo-preview-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: #E2EAF4;
  border: 2px solid var(--vibe-surface);
  box-shadow: var(--vibe-shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-navy-primary);
  overflow: hidden;
}

.photo-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.photo-file-input {
  display: none;
}

.upload-custom-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--vibe-radius-md);
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  cursor: pointer;
}

.upload-custom-btn:hover {
  background: var(--vibe-surface-hover);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--vibe-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #FCFDFE;
}

.modal-footer .action-pill-btn {
  border-radius: var(--vibe-radius-full);
  padding: 8px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all var(--vibe-transition-fast);
}

#modal-btn-cancel,
#modal-delete-cancel,
#vacation-btn-cancel,
#vacation-delete-cancel {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  color: var(--vibe-navy-primary);
  border-radius: var(--vibe-radius-full);
}

#modal-btn-cancel:hover,
#modal-delete-cancel:hover,
#vacation-btn-cancel:hover,
#vacation-delete-cancel:hover {
  background: var(--vibe-bg-workspace);
  border-color: #CAD6E4;
}

#modal-delete-confirm {
  background: #D32029;
  border-color: #D32029;
  color: #FFFFFF;
  border-radius: var(--vibe-radius-full);
}

#modal-delete-confirm:hover {
  background: #B31D25;
  border-color: #B31D25;
}

/* Tab de Telas do VIBE */
.vibe-tab-content {
  display: none;
}

.vibe-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: var(--vibe-space-5);
}

/* ==========================================================================
   PAINEL DE TURNOS — ESTILOS OFICIAIS CORPORATIVOS
   ========================================================================== */

/* Seletor de Período e Botões de Ação do Header */
.shifts-period-selector-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  padding: 4px 10px;
  border-radius: var(--vibe-radius-full);
}

.period-select-label {
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-semibold);
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
}

.period-select {
  border: none;
  background: transparent;
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  color: var(--vibe-text-primary);
  cursor: pointer;
  padding: 2px 4px;
}

.period-select:focus {
  outline: none;
}

.action-pill-btn.secondary {
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  border: 1px solid var(--vibe-border);
}

.action-pill-btn.secondary:hover {
  background: var(--vibe-surface-hover);
  border-color: #CAD6E4;
}

.action-pill-btn.secondary.active {
  background: var(--vibe-cyan-subtle);
  border-color: var(--vibe-cyan-accent);
  color: var(--vibe-navy-primary);
}

/* --- Indicadores Resumidos (KPIs no Topo) --- */
.shifts-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.shift-kpi-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid var(--vibe-border);
  transition: transform var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast);
}

.shift-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--vibe-shadow-elevated);
}

.shift-kpi-card.kpi-healthy {
  border-left-color: var(--vibe-status-success-text);
}

.shift-kpi-card.kpi-warning {
  border-left-color: var(--vibe-status-warning-text);
}

.shift-kpi-card.kpi-critical {
  border-left-color: var(--vibe-status-danger-text);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-card-label {
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-badge-neutral {
  font-size: var(--vibe-text-2xs);
  background: var(--vibe-surface-hover);
  padding: 2px 8px;
  border-radius: var(--vibe-radius-full);
  color: var(--vibe-text-secondary);
  border: 1px solid var(--vibe-border);
}

.health-mini-pill {
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-bold);
  padding: 2px 8px;
  border-radius: var(--vibe-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.health-mini-pill.healthy {
  background: var(--vibe-status-success-bg);
  color: var(--vibe-status-success-text);
  border: 1px solid var(--vibe-status-success-border);
}

.health-mini-pill.warning {
  background: var(--vibe-status-warning-bg);
  color: var(--vibe-status-warning-text);
  border: 1px solid var(--vibe-status-warning-border);
}

.health-mini-pill.critical {
  background: var(--vibe-status-danger-bg);
  color: var(--vibe-status-danger-text);
  border: 1px solid var(--vibe-status-danger-border);
}

.kpi-card-val {
  font-size: 2rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.kpi-healthy .kpi-card-val {
  color: var(--vibe-status-success-text);
}

.kpi-warning .kpi-card-val {
  color: var(--vibe-status-warning-text);
}

.kpi-critical .kpi-card-val {
  color: var(--vibe-status-danger-text);
}

.kpi-card-footnote {
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-text-secondary);
}

/* --- Grade dos 5 Cards de Turnos --- */
.shifts-cards-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading-h2 {
  font-size: 1.0625rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  margin: 0;
}

.section-sub-tag {
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-text-secondary);
  font-weight: var(--vibe-font-medium);
}

.shifts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.shift-overview-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 18px;
  box-shadow: var(--vibe-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast), border-color var(--vibe-transition-fast);
}

/* Cores Suaves dos Cards dos 5 Turnos no Painel de Turnos (Consistentes com Férias e Ausências) */
.shift-overview-card.shift-card-a,
.shift-overview-card[data-shift-id="Turno A"] {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.shift-overview-card.shift-card-b,
.shift-overview-card[data-shift-id="Turno B"] {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.shift-overview-card.shift-card-c,
.shift-overview-card[data-shift-id="Turno C"] {
  background: #FAF5FF;
  border-color: #E9D5FF;
}

.shift-overview-card.shift-card-d,
.shift-overview-card[data-shift-id="Turno D"] {
  background: #FEFCE8;
  border-color: #FEF08A;
}

.shift-overview-card.shift-card-e,
.shift-overview-card[data-shift-id="Turno E"] {
  background: #FFF1F2;
  border-color: #FECDD3;
}

/* Realce sutil no hover preservando a paleta de cada turno */
.shift-overview-card[data-shift-id="Turno A"]:hover {
  border-color: #93C5FD;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.08);
}

.shift-overview-card[data-shift-id="Turno B"]:hover {
  border-color: #86EFAC;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.08);
}

.shift-overview-card[data-shift-id="Turno C"]:hover {
  border-color: #D8B4FE;
  box-shadow: 0 4px 14px rgba(126, 34, 206, 0.08);
}

.shift-overview-card[data-shift-id="Turno D"]:hover {
  border-color: #FDE047;
  box-shadow: 0 4px 14px rgba(161, 98, 7, 0.08);
}

.shift-overview-card[data-shift-id="Turno E"]:hover {
  border-color: #FDA4AF;
  box-shadow: 0 4px 14px rgba(190, 18, 60, 0.08);
}

/* Ajuste refinado dos elementos internos nos cards coloridos para alto contraste */
.shift-overview-card .shift-specialist-row {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(221, 230, 240, 0.8);
}

.shift-overview-card .btn-shift-details {
  background: #FFFFFF;
  border-color: var(--vibe-border);
}

.shift-overview-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--vibe-shadow-elevated);
}

.shift-card-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shift-card-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.shift-card-name {
  font-size: 1.125rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  margin: 0;
}

.shift-card-hours-tag {
  font-size: var(--vibe-text-2xs);
  font-family: var(--vibe-font-mono);
  background: var(--vibe-surface-hover);
  border: 1px solid var(--vibe-border);
  color: var(--vibe-text-primary);
  padding: 2px 6px;
  border-radius: var(--vibe-radius-xs);
  font-weight: var(--vibe-font-medium);
}

.shift-card-scale-desc {
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-text-secondary);
}

/* Badge de Saúde Operacional */
.shift-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--vibe-radius-full);
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-bold);
  white-space: nowrap;
  flex-shrink: 0;
}

.shift-health-badge .health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.shift-health-badge.health-healthy {
  background: var(--vibe-status-success-bg);
  color: var(--vibe-status-success-text);
  border: 1px solid var(--vibe-status-success-border);
}
.shift-health-badge.health-healthy .health-dot {
  background: var(--vibe-status-success-text);
  box-shadow: 0 0 0 2px rgba(14, 124, 89, 0.2);
}

.shift-health-badge.health-warning {
  background: var(--vibe-status-warning-bg);
  color: var(--vibe-status-warning-text);
  border: 1px solid var(--vibe-status-warning-border);
}
.shift-health-badge.health-warning .health-dot {
  background: var(--vibe-status-warning-text);
}

.shift-health-badge.health-critical {
  background: var(--vibe-status-danger-bg);
  color: var(--vibe-status-danger-text);
  border: 1px solid var(--vibe-status-danger-border);
}
.shift-health-badge.health-critical .health-dot {
  background: var(--vibe-status-danger-text);
}

/* Especialista Responsável */
.shift-specialist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--vibe-surface-hover);
  border: 1px solid var(--vibe-border-subtle);
  border-radius: var(--vibe-radius-md);
}

.specialist-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--vibe-navy-primary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-bold);
  border: 1px solid rgba(40, 216, 232, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.specialist-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.specialist-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.specialist-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--vibe-text-secondary);
  font-weight: var(--vibe-font-semibold);
  letter-spacing: 0.04em;
}

.specialist-name {
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.specialist-role {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
}

/* Botão Alterar Responsável no Card */
.btn-change-leader {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-full);
  color: var(--vibe-navy-primary);
  font-size: 0.6875rem;
  font-weight: var(--vibe-font-semibold);
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
  transition: all var(--vibe-transition-fast);
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(13, 25, 43, 0.04);
}

.btn-change-leader:hover {
  background: var(--vibe-surface-hover);
  border-color: var(--vibe-blue-accent);
  color: var(--vibe-blue-accent);
  box-shadow: 0 2px 6px rgba(71, 138, 255, 0.15);
  transform: translateY(-1px);
}

.btn-change-leader:active {
  transform: translateY(0);
}

.btn-change-leader svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Tag de Inconsistência do Líder */
.leader-inconsistent-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--vibe-radius-xs);
  background: #FFF1F0;
  border: 1px solid #FFA39E;
  color: #D32029;
  font-size: 0.625rem;
  font-weight: 700;
  margin-top: 2px;
  width: fit-content;
}

.leader-inconsistent-tag svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
}

/* Métricas de Efetivo (Atual vs Previsto) */
.shift-metrics-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--vibe-border-subtle);
  border-bottom: 1px solid var(--vibe-border-subtle);
}

.metric-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-title {
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-text-secondary);
  font-weight: var(--vibe-font-semibold);
  text-transform: uppercase;
}

.metric-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-value-large {
  font-size: 1.5rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  line-height: 1.1;
}

.metric-unit {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
}

/* Cluster de Avatares da Equipe */
.shift-team-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-preview-label {
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-text-secondary);
  font-weight: var(--vibe-font-semibold);
}

.shift-avatars-cluster {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shift-mini-avatar,
.shift-mini-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--vibe-surface);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  object-fit: cover;
  flex-shrink: 0;
}

.shift-mini-avatar-placeholder {
  background: var(--vibe-navy-secondary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: var(--vibe-font-bold);
}

.shift-mini-avatar-placeholder.avatar-inactive {
  background: #E5E7EB;
  color: #6B7280;
}

.shift-mini-avatar-more {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--vibe-surface-hover);
  color: var(--vibe-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: var(--vibe-font-bold);
  border: 1.5px solid var(--vibe-border);
}

/* Caixa de Alteração Prevista de Efetivo */
.shift-card-change-box {
  padding: 10px 12px;
  border-radius: var(--vibe-radius-md);
  font-size: var(--vibe-text-xs);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shift-card-change-box.change-box-warning {
  background: var(--vibe-status-warning-bg);
  border: 1px solid var(--vibe-status-warning-border);
  color: var(--vibe-status-warning-text);
}

.shift-card-change-box.change-box-critical {
  background: var(--vibe-status-danger-bg);
  border: 1px solid var(--vibe-status-danger-border);
  color: var(--vibe-status-danger-text);
}

.shift-card-change-box.change-box-stable {
  background: var(--vibe-surface-hover);
  border: 1px solid var(--vibe-border-subtle);
  color: var(--vibe-text-secondary);
}

.change-box-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--vibe-font-bold);
  font-size: var(--vibe-text-2xs);
  text-transform: uppercase;
}

.change-box-body {
  font-size: var(--vibe-text-xs);
  line-height: 1.3;
}

.change-box-reason {
  font-size: 0.6875rem;
  opacity: 0.85;
  margin-top: 2px;
}

/* Botão de Consulta de Detalhes no Card */
.shift-card-action-bar {
  margin-top: auto;
  padding-top: 6px;
}

.btn-shift-details {
  width: 100%;
  height: 38px;
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  color: var(--vibe-navy-primary);
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--vibe-transition-fast);
}

.btn-shift-details svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  transition: transform var(--vibe-transition-fast);
}

.btn-shift-details:hover {
  background: var(--vibe-navy-primary);
  color: var(--vibe-surface);
  border-color: var(--vibe-navy-primary);
}

.btn-shift-details:hover svg {
  transform: translateX(3px);
  stroke: var(--vibe-cyan-accent);
}

/* ==========================================================================
   LINHA DO TEMPO DA SAÚDE DOS TURNOS (TIMELINE)
   ========================================================================== */
.shifts-timeline-card {
  padding: 0;
  overflow: hidden;
}

.timeline-header-bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--vibe-border);
}

.timeline-controls-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-highlight-box {
  padding: 14px 20px;
  border-bottom: 1px solid var(--vibe-border-subtle);
  background: #FCFDFE;
}

.timeline-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FFF8EB;
  border: 1px solid #FFE3B3;
  padding: 12px 16px;
  border-radius: var(--vibe-radius-md);
  color: #A0640D;
  width: 100%;
  box-sizing: border-box;
}

.timeline-alert-banner.neutral {
  background: var(--vibe-status-success-bg);
  border-color: var(--vibe-status-success-border);
  color: var(--vibe-status-success-text);
}

.alert-icon-circle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.alert-icon-circle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.alert-text-block {
  flex: 1;
  min-width: 0;
}

.alert-banner-title {
  display: block;
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-bold);
  margin-bottom: 4px;
}

.alert-text-block p {
  margin: 0;
  font-size: var(--vibe-text-xs);
  line-height: 1.45;
  opacity: 0.95;
}

.alert-text-block p strong {
  display: inline;
  font-weight: var(--vibe-font-bold);
}

.timeline-table-outer {
  overflow-x: auto;
  padding: 12px 20px;
}

.vibe-timeline-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  min-width: 680px;
}

.timeline-col-shift {
  text-align: left;
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-text-secondary);
  font-weight: var(--vibe-font-bold);
  text-transform: uppercase;
  padding: 8px 12px;
  width: 220px;
}

.timeline-col-period {
  padding: 8px 4px;
  text-align: center;
}

.period-header-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.period-label-text {
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
}

.period-tag-current {
  font-size: 0.625rem;
  background: var(--vibe-cyan-accent);
  color: var(--vibe-navy-primary);
  font-weight: var(--vibe-font-bold);
  padding: 1px 6px;
  border-radius: var(--vibe-radius-full);
}

.timeline-row-shift-info {
  padding: 10px 12px;
  background: var(--vibe-surface-hover);
  border-radius: var(--vibe-radius-md);
  border: 1px solid var(--vibe-border-subtle);
}

.timeline-cell-data {
  padding: 0;
}

.timeline-cell-block {
  padding: 10px 12px;
  border-radius: var(--vibe-radius-md);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 58px;
  justify-content: center;
}

.timeline-cell-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.tl-cell-healthy {
  background: var(--vibe-status-success-bg);
  border: 1px solid var(--vibe-status-success-border);
  color: var(--vibe-status-success-text);
}
.tl-cell-healthy .cell-dot {
  background: var(--vibe-status-success-text);
}

.tl-cell-warning {
  background: var(--vibe-status-warning-bg);
  border: 1px solid var(--vibe-status-warning-border);
  color: var(--vibe-status-warning-text);
}
.tl-cell-warning .cell-dot {
  background: var(--vibe-status-warning-text);
}

.tl-cell-critical {
  background: var(--vibe-status-danger-bg);
  border: 1px solid var(--vibe-status-danger-border);
  color: var(--vibe-status-danger-text);
}
.tl-cell-critical .cell-dot {
  background: var(--vibe-status-danger-text);
}

.cell-selected .timeline-cell-block {
  outline: 2px solid var(--vibe-cyan-accent);
  outline-offset: 1px;
}

.cell-status-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cell-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cell-count-text {
  font-weight: var(--vibe-font-bold);
  font-size: var(--vibe-text-xs);
}

.cell-status-sub {
  font-size: 0.6875rem;
  opacity: 0.85;
}

.absence-mini-tag {
  font-size: 0.625rem;
  font-weight: var(--vibe-font-semibold);
  display: block;
  white-space: nowrap;
}

.timeline-footnote-box {
  padding: 12px 20px;
  background: #FCFDFE;
  border-top: 1px solid var(--vibe-border-subtle);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
  line-height: 1.4;
}

.timeline-footnote-box svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==========================================================================
   VISÃO DETALHADA DO TURNO & CARDS MODERNOS DE OPERADORES (REFERÊNCIA 2)
   ========================================================================== */
.shift-detail-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shift-detail-header-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 18px 24px;
  box-shadow: var(--vibe-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--vibe-blue-accent);
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--vibe-radius-sm);
  transition: background var(--vibe-transition-fast);
}

.btn-back-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.btn-back-link:hover {
  background: var(--vibe-blue-subtle);
}

.detail-header-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-title-group h2 {
  font-size: 1.375rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  margin: 0 0 4px 0;
}

.detail-title-group p {
  margin: 0;
  font-size: var(--vibe-text-xs);
  color: var(--vibe-text-secondary);
}

.detail-metrics-chips {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-chip {
  background: var(--vibe-surface-hover);
  border: 1px solid var(--vibe-border);
  padding: 6px 12px;
  border-radius: var(--vibe-radius-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chip-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--vibe-text-secondary);
  font-weight: var(--vibe-font-semibold);
}

.chip-val {
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
}

.shift-detail-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  padding: 6px 12px;
  width: 380px;
  max-width: 100%;
}

.detail-search-box svg {
  width: 16px;
  height: 16px;
  stroke: var(--vibe-text-secondary);
  stroke-width: 2;
  fill: none;
}

.detail-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: var(--vibe-text-xs);
  color: var(--vibe-text-primary);
}

.detail-search-box input:focus {
  outline: none;
}

.detail-count-text {
  font-size: var(--vibe-text-xs);
  color: var(--vibe-text-secondary);
}

/* Grade de Cards Modernos de Operadores */
.modern-team-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.modern-person-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 18px;
  box-shadow: var(--vibe-shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast), border-color var(--vibe-transition-fast);
}

.modern-person-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--vibe-shadow-elevated);
  border-color: #CAD6E4;
}

.person-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.person-avatar-wrapper {
  flex-shrink: 0;
}

.team-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--vibe-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.team-card-avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--vibe-navy-secondary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--vibe-text-sm);
  font-weight: var(--vibe-font-bold);
  border: 1.5px solid rgba(40, 216, 232, 0.35);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.person-id-block {
  flex: 1;
  min-width: 0;
}

.person-fullname {
  font-size: var(--vibe-text-base);
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-matricula {
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-text-secondary);
  font-family: var(--vibe-font-mono);
  display: block;
}

.person-status-badge-wrap {
  flex-shrink: 0;
}

.team-status-pill {
  font-size: var(--vibe-text-2xs);
  font-weight: var(--vibe-font-bold);
  padding: 3px 8px;
  border-radius: var(--vibe-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.team-status-pill.active {
  background: var(--vibe-status-success-bg);
  color: var(--vibe-status-success-text);
  border: 1px solid var(--vibe-status-success-border);
}
.team-status-pill.active .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vibe-status-success-text);
}

.team-status-pill.inactive {
  background: var(--vibe-status-warning-bg);
  color: var(--vibe-status-warning-text);
  border: 1px solid var(--vibe-status-warning-border);
}
.team-status-pill.inactive .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vibe-status-warning-text);
}

.person-meta-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--vibe-border-subtle);
  border-bottom: 1px solid var(--vibe-border-subtle);
  font-size: var(--vibe-text-xs);
}

.person-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.meta-field-label {
  font-size: var(--vibe-text-2xs);
  color: var(--vibe-text-secondary);
  flex-shrink: 0;
}

.meta-field-value {
  color: var(--vibe-text-primary);
  text-align: right;
  font-size: var(--vibe-text-xs);
}

/* Rodapé com Botões de Contato (E-mail e Ligar) */
.person-card-actions-footer,
.op-card-contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-action-contact,
.card-contact-btn {
  height: 38px;
  border-radius: var(--vibe-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--vibe-text-xs);
  font-weight: var(--vibe-font-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
}

.btn-action-contact svg,
.card-contact-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

/* Botão E-mail */
.btn-action-contact.btn-email:hover,
.card-contact-btn.email-btn:hover {
  background: var(--vibe-blue-subtle);
  border-color: var(--vibe-blue-accent);
  color: var(--vibe-blue-accent);
}

/* Botão Ligar */
.btn-action-contact.btn-call:hover,
.card-contact-btn.call-btn:hover {
  background: var(--vibe-status-success-bg);
  border-color: var(--vibe-status-success-border);
  color: var(--vibe-status-success-text);
}

/* Botões Desabilitados */
.btn-action-contact.disabled,
.card-contact-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--vibe-surface-hover);
  border-color: var(--vibe-border-subtle);
  color: var(--vibe-text-secondary);
  pointer-events: none;
}

.empty-shift-team-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: var(--vibe-surface);
  border: 1px dashed var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  color: var(--vibe-text-secondary);
}

/* Responsividade do Painel de Turnos */
@media (max-width: 900px) {
  .shifts-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shifts-cards-grid {
    grid-template-columns: 1fr;
  }
  .detail-header-main {
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-metrics-chips {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .shifts-kpi-grid {
    grid-template-columns: 1fr;
  }
  .shift-metrics-split {
    grid-template-columns: 1fr;
  }
  .person-card-actions-footer,
  .op-card-contact-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   VIBE — Módulo de Férias e Ausências (Fiel à Referência Visual Aprovada)
   ========================================================================== */

/* A. Cabeçalho Executivo */
.vacations-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.vacations-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vacations-title {
  font-size: 1.5rem; /* 24px */
  font-weight: 800;
  color: var(--vibe-navy-primary);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.vacations-subtitle {
  font-size: 0.875rem; /* 14px */
  color: var(--vibe-text-secondary);
  margin: 0;
}

.vacations-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Seletor de Ano (Pill com setas) */
.vacation-year-pill {
  display: inline-flex;
  align-items: center;
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-full);
  padding: 3px 8px;
  box-shadow: var(--vibe-shadow-sm);
  gap: 6px;
}

.vacation-year-pill .pill-nav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--vibe-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: all var(--vibe-transition-fast);
}

.vacation-year-pill .pill-nav-btn:hover {
  background: var(--vibe-bg-workspace);
  color: var(--vibe-text-primary);
}

.vacation-year-pill .pill-nav-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.vacation-year-pill .pill-year-text {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--vibe-navy-primary);
  min-width: 42px;
  text-align: center;
}

/* Alternador Segmentado Mês / Ano */
.vacation-view-segmented {
  display: inline-flex;
  background: #EAEFF5;
  border-radius: var(--vibe-radius-full);
  padding: 3px;
  gap: 2px;
}

.vacation-view-segmented .seg-btn {
  background: transparent;
  border: none;
  border-radius: var(--vibe-radius-full);
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
}

.vacation-view-segmented .seg-btn:hover {
  color: var(--vibe-text-primary);
}

.vacation-view-segmented .seg-btn.active {
  background: #0066EE;
  background: var(--vibe-blue-accent);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(71, 138, 255, 0.35);
}

/* Botão Principal + Nova Programação */
.btn-new-programacao {
  background: #0066EE;
  background: var(--vibe-blue-accent);
  color: #FFFFFF;
  border: none;
  border-radius: var(--vibe-radius-full);
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
  box-shadow: 0 2px 8px rgba(71, 138, 255, 0.35);
}

.btn-new-programacao:hover {
  background: #0052CC;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(71, 138, 255, 0.45);
}

.btn-new-programacao svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* B. Indicadores Resumidos (4 Cards Compactos em Linha) */
.vacations-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.vacation-kpi-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(13, 25, 43, 0.03);
  transition: transform var(--vibe-transition-fast);
}

.vacation-kpi-card:hover {
  transform: translateY(-1px);
}

.kpi-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-box svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.kpi-icon-blue {
  background: #EBF5FF;
  color: #3B82F6;
}

.kpi-icon-cyan {
  background: #E6FCFE;
  color: #06B6D4;
}

.kpi-icon-warning {
  background: #FEF9C3;
  color: #CA8A04;
}

.kpi-icon-danger {
  background: #FEE2E2;
  color: #EF4444;
}

.kpi-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.kpi-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
  white-space: nowrap;
}

.kpi-val-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kpi-val-number {
  font-size: 1.625rem; /* 26px */
  font-weight: 800;
  color: var(--vibe-navy-primary);
  line-height: 1.1;
}

.kpi-val-trend {
  font-size: 0.6875rem;
  font-weight: 700;
}

.kpi-val-trend.text-success {
  color: #10B981;
}

.kpi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 2px;
}

.kpi-dot.dot-success {
  background: #10B981;
}

.kpi-dot.dot-warning {
  background: #F59E0B;
}

.kpi-dot.dot-danger {
  background: #EF4444;
}

/* C. Card Principal do Calendário / Linha do Tempo */
.vacations-calendar-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(13, 25, 43, 0.04);
  margin-bottom: 22px;
  overflow: hidden;
}

.calendar-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--vibe-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.calendar-nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-nav-buttons {
  display: inline-flex;
  gap: 4px;
}

.cal-nav-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
}

.cal-nav-arrow:hover {
  background: var(--vibe-bg-workspace);
  color: var(--vibe-text-primary);
  border-color: var(--vibe-border-hover);
}

.cal-nav-arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.cal-current-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
  cursor: pointer;
  user-select: none;
}

.chevron-down-icon {
  width: 14px;
  height: 14px;
  stroke: var(--vibe-text-secondary);
  stroke-width: 2;
  fill: none;
}

.calendar-legend-group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.legend-items {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibe-text-primary);
  background: var(--vibe-bg-workspace);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--vibe-border);
}

.legend-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  display: inline-block;
}

.legend-chip-dot.dot-ferias {
  background: #60A5FA;
}

.legend-chip-dot.dot-afastamento {
  background: #A78BFA;
}

.legend-chip-dot.dot-dayoff {
  background: #94A3B8;
}

.legend-chip-dot.dot-troca {
  background: #F59E0B;
}

.btn-cal-today {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-full);
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibe-text-primary);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
}

.btn-cal-today:hover {
  background: var(--vibe-bg-workspace);
  border-color: var(--vibe-border-hover);
}

/* Timeline Grid Scroll Wrapper */
.calendar-grid-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.calendar-grid-table {
  min-width: 1250px;
  display: flex;
  flex-direction: column;
}

/* Header Row da Régua Temporal */
.cal-header-row {
  display: flex;
  border-bottom: 1px solid var(--vibe-border);
  background: #FAFBFD;
  position: sticky;
  top: 0;
  z-index: 10;
}

.cal-th-operator {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  left: 0;
  background: #FAFBFD;
  z-index: 12;
  border-right: 1px solid var(--vibe-border);
  box-shadow: 2px 0 4px rgba(13, 25, 43, 0.02);
}

.cal-th-turno {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  padding: 10px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  position: sticky;
  left: 200px;
  background: #FAFBFD;
  z-index: 12;
  border-right: 1px solid var(--vibe-border);
  box-shadow: 2px 0 4px rgba(13, 25, 43, 0.02);
}

.cal-days-header-track {
  flex: 1;
  display: flex;
  position: relative;
}

.cal-day-th {
  flex: 1;
  min-width: 32px;
  padding: 6px 1px;
  text-align: center;
  border-right: 1px solid #EDF2F7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.cal-day-th:last-child {
  border-right: none;
}

.cal-day-th .day-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
  line-height: 1.1;
}

.cal-day-th .day-week {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
}

/* Destaque da Coluna do Dia Atual (Hoje) */
.cal-day-th.is-today-col {
  background: #EBF5FF;
}

.cal-day-th.is-today-col .day-badge-today {
  background: #3B82F6;
  color: #FFFFFF;
  border-radius: 4px;
  padding: 1px 4px;
}

.cal-day-th.is-today-col .day-num {
  color: #FFFFFF;
}

.cal-day-th.is-today-col .day-week {
  color: #FFFFFF;
}

/* Linha de Cada Operador */
.cal-body-row {
  display: flex;
  border-bottom: 1px solid var(--vibe-border);
  position: relative;
  min-height: 58px;
  transition: background var(--vibe-transition-fast);
}

.cal-body-row:last-child {
  border-bottom: none;
}

.cal-body-row:hover {
  background: rgba(71, 138, 255, 0.02);
}

.cal-td-operator {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  left: 0;
  background: var(--vibe-surface);
  z-index: 8;
  border-right: 1px solid var(--vibe-border);
  box-shadow: 2px 0 4px rgba(13, 25, 43, 0.02);
}

.cal-body-row:hover .cal-td-operator {
  background: #FAFBFD;
}

.cal-op-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--vibe-border);
  flex-shrink: 0;
}

.cal-op-avatar-initials {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vibe-navy-secondary) 0%, var(--vibe-navy-primary) 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cal-op-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 1px;
}

.cal-op-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-op-mat {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
  font-family: var(--vibe-font-mono);
}

/* Coluna Fixa do Turno */
.cal-td-turno {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  padding: 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  left: 200px;
  background: var(--vibe-surface);
  z-index: 8;
  border-right: 1px solid var(--vibe-border);
  box-shadow: 2px 0 4px rgba(13, 25, 43, 0.02);
}

.cal-body-row:hover .cal-td-turno {
  background: #FAFBFD;
}

/* Badges Coloridos de Turno */
.shift-pill-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.shift-pill-a {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.shift-pill-b {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.shift-pill-c {
  background: #FAF5FF;
  color: #7E22CE;
  border: 1px solid #E9D5FF;
}

.shift-pill-d {
  background: #FEFCE8;
  color: #A16207;
  border: 1px solid #FEF08A;
}

.shift-pill-e {
  background: #FFF1F2;
  color: #BE123C;
  border: 1px solid #FECDD3;
}

/* Faixa dos Dias na Linha do Operador */
.cal-days-body-track {
  flex: 1;
  position: relative;
  display: flex;
}

.cal-day-cell-slot {
  flex: 1;
  min-width: 32px;
  border-right: 1px dashed rgba(226, 232, 240, 0.7);
}

.cal-day-cell-slot:last-child {
  border-right: none;
}

/* Linha Vertical Indicadora de Hoje */
.cal-today-vertical-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #3B82F6;
  z-index: 5;
  pointer-events: none;
  opacity: 0.85;
}

/* Contêiner das Barras de Ausência */
.cal-absence-bars-container {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

/* Barra de Ausência com Estilo Idêntico à Imagem */
.cal-absence-bar {
  position: absolute;
  top: 8px;
  bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  z-index: 4;
  transition: transform var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast);
  box-sizing: border-box;
  overflow: hidden;
}

.cal-absence-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 25, 43, 0.12);
}

/* Tipos de Ausência */
.cal-absence-bar.type-ferias {
  background: #D9EFFF;
  border: 1px solid #A8D8FD;
  color: #0369A1;
}

.cal-absence-bar.type-afastamento {
  background: #EDE9FE;
  border: 1px solid #DDD6FE;
  color: #6D28D9;
}

.cal-absence-bar.type-dayoff {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #475569;
}

.cal-absence-bar.type-troca {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #B45309;
}

/* Efeito de Continuidade Intermensal (hachuras e seta para o próximo mês) */
.cal-absence-bar.continues-next {
  background: repeating-linear-gradient(
    -45deg,
    #D9EFFF,
    #D9EFFF 6px,
    #CBE8FE 6px,
    #CBE8FE 12px
  );
  border-right: 2px dashed #0284C7;
}

.cal-absence-bar.type-afastamento.continues-next {
  background: repeating-linear-gradient(
    -45deg,
    #EDE9FE,
    #EDE9FE 6px,
    #DDD6FE 6px,
    #DDD6FE 12px
  );
  border-right: 2px dashed #7C3AED;
}

.cal-absence-bar .bar-arrow-indicator {
  margin-left: auto;
  font-size: 0.875rem;
  font-weight: 800;
  color: currentColor;
  opacity: 0.85;
}

.bar-mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.bar-mini-avatar-initials {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(13, 25, 43, 0.25);
  color: #FFFFFF;
  font-size: 0.5625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bar-text-block {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.bar-type-title {
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.1;
}

.bar-meta-desc {
  font-size: 0.625rem;
  opacity: 0.85;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* D. Áreas Inferiores: Grid de 2 Colunas */
.vacations-bottom-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* Card Esquerdo: Tabela de Programações do Mês */
.vacations-month-table-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(13, 25, 43, 0.03);
}

.card-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title-with-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-with-badge h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--vibe-navy-primary);
  margin: 0;
}

.badge-count {
  background: #F1F5F9;
  color: var(--vibe-text-secondary);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-card-filter {
  background: transparent;
  border: none;
  color: var(--vibe-text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--vibe-transition-fast);
}

.btn-card-filter:hover {
  background: var(--vibe-bg-workspace);
  color: var(--vibe-text-primary);
}

.btn-card-filter svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Tabela de Ausências do Mês */
.vacations-month-table {
  width: 100%;
  border-collapse: collapse;
}

.vacations-month-table th {
  padding: 9px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--vibe-border);
  text-align: left;
}

.vacations-month-table td {
  padding: 9px 8px;
  font-size: 0.75rem;
  color: var(--vibe-text-primary);
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.vacations-month-table tr:last-child td {
  border-bottom: none;
}

.vacations-month-table tr:hover td {
  background: rgba(71, 138, 255, 0.02);
}

.table-op-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-op-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.table-op-avatar-initials {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vibe-navy-secondary) 0%, var(--vibe-navy-primary) 100%);
  color: #FFFFFF;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-status-prog {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: #EBF5FF;
  color: #0284C7;
}

.badge-status-canc {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: #F1F5F9;
  color: var(--vibe-text-secondary);
  text-decoration: line-through;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-tbl-action {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  color: var(--vibe-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--vibe-transition-fast);
}

.btn-tbl-action:hover {
  color: var(--vibe-blue);
  background: var(--vibe-bg-workspace);
}

.btn-tbl-action.delete:hover {
  color: #EF4444;
  background: #FEE2E2;
}

.btn-tbl-action svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Card Direito: Impacto nos Turnos */
.vacations-shift-impact-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(13, 25, 43, 0.03);
}

.card-title-group h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--vibe-navy-primary);
  margin: 0;
}

.subtitle-parenthesis {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--vibe-text-secondary);
}

.badge-date-range {
  background: #F8FAFC;
  border: 1px solid var(--vibe-border);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
}

.shift-impact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shift-impact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  background: #FAFBFD;
  border: 1px solid #F1F5F9;
  transition: all var(--vibe-transition-fast);
  cursor: pointer;
}

.shift-impact-row:hover {
  background: #F1F5F9;
  border-color: var(--vibe-border);
}

.shift-impact-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 110px;
}

.shift-avatar-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shift-avatar-box svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.shift-avatar-a { background: #EFF6FF; color: #3B82F6; }
.shift-avatar-b { background: #F0FDF4; color: #10B981; }
.shift-avatar-c { background: #FAF5FF; color: #8B5CF6; }
.shift-avatar-d { background: #FEFCE8; color: #F59E0B; }
.shift-avatar-e { background: #FFF1F2; color: #EF4444; }

.shift-impact-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
}

.shift-impact-headcount {
  font-size: 0.75rem;
  color: var(--vibe-text-secondary);
  font-weight: 500;
}

.shift-impact-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.6875rem;
  font-weight: 700;
}

.health-status-chip .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.health-status-saudavel {
  background: #DEF7EC;
  color: #03543F;
}
.health-status-saudavel .chip-dot {
  background: #0E9F6E;
}

.health-status-atencao {
  background: #FEF08A;
  color: #713F12;
}
.health-status-atencao .chip-dot {
  background: #D97706;
}

.health-status-critico {
  background: #FDE8E8;
  color: #9B1C1C;
}
.health-status-critico .chip-dot {
  background: #E02424;
}

.shift-impact-row .chevron-right-icon {
  width: 14px;
  height: 14px;
  stroke: var(--vibe-text-secondary);
  stroke-width: 2.2;
  fill: none;
}

/* Responsividade de Férias e Ausências */
@media (max-width: 1100px) {
  .vacations-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .vacations-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .vacations-kpi-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Módulo de Alteração de Responsável / Líder do Turno (Modal & Botão)
   ========================================================================== */

.leader-modal-dialog {
  max-width: 560px;
  width: 95%;
}

.modal-header-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-header-subtitle {
  font-size: 0.75rem;
  color: var(--vibe-text-secondary);
  font-weight: 500;
}

.leader-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(85vh - 140px);
  overflow-y: auto;
}

/* Bloco do Responsável Atual */
.current-leader-banner {
  background: #F8FAFD;
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.current-leader-tag {
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--vibe-text-secondary);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.current-leader-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.current-leader-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--vibe-navy-primary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid rgba(40, 216, 232, 0.35);
  overflow: hidden;
  flex-shrink: 0;
}

.current-leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.current-leader-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.current-leader-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--vibe-text-primary);
}

.current-leader-role {
  font-size: 0.75rem;
  color: var(--vibe-text-secondary);
}

.inconsistency-warning-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #FFF1F0;
  border: 1px solid #FFA39E;
  border-radius: var(--vibe-radius-sm);
  color: #D32029;
  font-size: 0.75rem;
  font-weight: 600;
}

.inconsistency-warning-badge svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
}

/* Barra de Pesquisa de Operadores no Modal */
.leader-search-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leader-search-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vibe-text-primary);
}

.leader-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.leader-search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  stroke: var(--vibe-text-secondary);
  stroke-width: 2.2;
  fill: none;
  pointer-events: none;
}

.leader-search-input {
  width: 100%;
  height: 40px;
  padding: 8px 36px 8px 38px;
  background: #FFFFFF;
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  color: var(--vibe-text-primary);
  font-size: 0.8125rem;
  outline: none;
  transition: all var(--vibe-transition-fast);
}

.leader-search-input:focus {
  border-color: var(--vibe-blue-accent);
  box-shadow: 0 0 0 3px rgba(71, 138, 255, 0.15);
}

.leader-search-clear-btn {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--vibe-text-secondary);
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.leader-search-clear-btn:hover {
  background: var(--vibe-bg-workspace);
  color: var(--vibe-text-primary);
}

/* Lista de Operadores Ativos */
.leader-operators-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 4px;
}

.leader-operators-list::-webkit-scrollbar {
  width: 6px;
}
.leader-operators-list::-webkit-scrollbar-track {
  background: var(--vibe-bg-workspace);
  border-radius: 3px;
}
.leader-operators-list::-webkit-scrollbar-thumb {
  background: #D2DCE8;
  border-radius: 3px;
}

.leader-operator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
  user-select: none;
}

.leader-operator-card:hover {
  border-color: var(--vibe-blue-accent);
  background: #F9FBFF;
}

.leader-operator-card.selected {
  border-color: var(--vibe-blue-accent);
  background: #F0F6FF;
  box-shadow: 0 0 0 2px rgba(71, 138, 255, 0.2);
}

.leader-operator-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #BAC7D5;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--vibe-transition-fast);
}

.leader-operator-card.selected .leader-operator-radio {
  border-color: var(--vibe-blue-accent);
  background: var(--vibe-blue-accent);
}

.leader-operator-card.selected .leader-operator-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
}

.leader-operator-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--vibe-navy-primary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(40, 216, 232, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.leader-operator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-operator-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.leader-operator-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.leader-operator-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--vibe-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-operator-matricula {
  font-size: 0.6875rem;
  font-family: var(--vibe-font-mono);
  color: var(--vibe-text-secondary);
  font-weight: 600;
}

.leader-operator-row-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.leader-operator-role {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
}

.leader-shift-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--vibe-radius-full);
  background: #E8F4FE;
  color: #1765C1;
  border: 1px solid #BFDBFE;
  white-space: nowrap;
}

.leader-empty-search {
  padding: 24px 16px;
  text-align: center;
  background: var(--vibe-bg-workspace);
  border: 1px dashed var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  color: var(--vibe-text-secondary);
  font-size: 0.8125rem;
}

.leader-modal-error {
  padding: 8px 12px;
  background: #FFF1F0;
  border: 1px solid #FFA39E;
  border-radius: var(--vibe-radius-md);
  color: #D32029;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==========================================================================
   MÓDULO: EQUILÍBRIO DE TURNOS (DESIGN SYSTEM OFICIAL)
   ========================================================================== */

/* Banner de Aviso de Modo Demonstração Visual */
.balance-demo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--vibe-radius-md);
  margin-bottom: 16px;
  animation: fadeInDown 0.3s ease;
}

.demo-banner-icon {
  font-size: 1.125rem;
}

.demo-banner-text {
  flex: 1;
  font-size: 0.8125rem;
  color: #92400E;
  line-height: 1.4;
}

.demo-banner-text strong {
  font-weight: 700;
}

.demo-banner-badge {
  padding: 3px 8px;
  background: #F59E0B;
  color: #FFFFFF;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Controles de Cabeçalho do Equilíbrio de Turnos */
.balance-control-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-full);
  padding: 4px 12px;
}

.balance-control-item .control-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
}

.balance-control-item select.period-select,
.balance-control-item input.date-select {
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
  outline: none;
  cursor: pointer;
}

.balance-control-item .date-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-control-item .cal-icon {
  width: 14px;
  height: 14px;
  stroke: var(--vibe-text-secondary);
  fill: none;
  stroke-width: 2;
}

/* Toggle Switch do Modo Demonstração */
.balance-toggle-item {
  display: flex;
  align-items: center;
}

.toggle-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
}

.toggle-switch-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-slider {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  background-color: #CBD5E1;
  border-radius: 18px;
  transition: all var(--vibe-transition-fast);
}

.toggle-switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: all var(--vibe-transition-fast);
}

.toggle-switch-label input:checked + .toggle-switch-slider {
  background-color: #3B82F6;
}

.toggle-switch-label input:checked + .toggle-switch-slider:before {
  transform: translateX(16px);
}

.toggle-switch-text {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Barra de Sub-Abas do Equilíbrio de Turnos */
.balance-subtabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.balance-subtab-btn {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-full);
  padding: 7px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
  cursor: pointer;
  transition: all var(--vibe-transition-fast);
}

.balance-subtab-btn:hover {
  background: var(--vibe-bg-workspace);
  color: var(--vibe-navy-primary);
  border-color: #CBD5E1;
}

.balance-subtab-btn.active {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

/* Subvisões */
.balance-subview {
  display: none;
}

.balance-subview.active {
  display: block;
}

/* Grid dos 5 Cards Superiores de Turnos */
.balance-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.balance-shift-card {
  border-radius: var(--vibe-radius-lg);
  border: 1px solid;
  padding: 16px 18px;
  box-shadow: var(--vibe-shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast);
}

.balance-shift-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--vibe-shadow-card-hover);
}

.balance-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.balance-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
}

.balance-leader-badge {
  font-size: 1.125rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.balance-card-main-stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 2px;
}

.balance-card-number {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--vibe-navy-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.balance-card-unit {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--vibe-text-secondary);
}

.balance-card-nodata {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--vibe-text-secondary);
}

.balance-card-sublabel {
  font-size: 0.75rem;
  color: var(--vibe-text-secondary);
  margin-bottom: 12px;
}

.balance-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.balance-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease-out;
}

.balance-card-footer-percent {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
}

/* Grid Central de Gráficos (Lado a Lado) */
.balance-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.balance-chart-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--vibe-shadow-card);
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  width: 18px;
  height: 18px;
  stroke: var(--vibe-navy-primary);
  fill: none;
  stroke-width: 2;
}

.card-trophy-icon {
  font-size: 1.125rem;
}

.chart-card-title-group h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
  margin: 0;
}

.balance-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legend-dot-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
}

.legend-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.chart-render-box {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-svg-chart {
  width: 100%;
  height: auto;
  max-height: 240px;
  overflow: visible;
}

.balance-chart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  color: var(--vibe-text-secondary);
  font-size: 0.8125rem;
  gap: 8px;
}

.balance-empty-hint {
  font-size: 0.75rem;
  color: #94A3B8;
}

/* Grid Inferior: Tabela Resumo e Ranking */
.balance-bottom-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
}

.balance-table-card,
.balance-ranking-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--vibe-shadow-card);
  display: flex;
  flex-direction: column;
}

.balance-monthly-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.balance-monthly-summary-table th,
.balance-monthly-summary-table td {
  padding: 7px 10px;
  font-size: 0.75rem;
  text-align: center;
  border-bottom: 1px solid #F1F5F9;
}

.balance-monthly-summary-table th {
  background: #FAFBFD;
  font-weight: 700;
  color: var(--vibe-text-secondary);
  border-bottom: 1px solid var(--vibe-border);
}

.balance-monthly-summary-table .col-month-name {
  text-align: left;
  font-weight: 600;
  color: var(--vibe-text-primary);
  width: 140px;
}

.balance-monthly-summary-table .row-future td {
  color: #CBD5E1;
}

.balance-monthly-summary-table .row-total td {
  background: #FAFBFD;
  border-top: 1.5px solid var(--vibe-border);
  border-bottom: none;
  padding-top: 10px;
  padding-bottom: 10px;
}

.balance-monthly-summary-table .col-shift-val.has-value {
  font-weight: 600;
  color: var(--vibe-navy-primary);
}

.balance-monthly-summary-table .col-shift-val.is-zero {
  color: #94A3B8;
}

.balance-table-nodata-msg {
  padding: 30px !important;
  color: var(--vibe-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Painel de Ranking */
.ranking-rows-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.balance-ranking-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--vibe-radius-md);
  transition: background var(--vibe-transition-fast);
}

.balance-ranking-row:hover {
  background: #F8FAFC;
}

.ranking-pos-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F1F5F9;
  color: var(--vibe-navy-primary);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ranking-pos-badge.pos-1 {
  background: #FEF08A;
  color: #854D0E;
}

.ranking-pos-badge.pos-2 {
  background: #E2E8F0;
  color: #334155;
}

.ranking-pos-badge.pos-3 {
  background: #FFEDD5;
  color: #9A3412;
}

.ranking-shift-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid;
  width: 76px;
  text-align: center;
  flex-shrink: 0;
}

.ranking-days-count {
  width: 65px;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--vibe-navy-primary);
  flex-shrink: 0;
}

.ranking-days-count strong {
  font-size: 0.9375rem;
  font-weight: 800;
}

.ranking-days-count span {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
}

.ranking-bar-track {
  flex: 1;
  height: 8px;
  background: #F1F5F9;
  border-radius: 4px;
  overflow: hidden;
}

.ranking-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.ranking-percent-label {
  width: 85px;
  text-align: right;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
  flex-shrink: 0;
}

.ranking-info-footer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--vibe-radius-md);
  margin-top: 14px;
  font-size: 0.6875rem;
  color: #1E40AF;
  line-height: 1.4;
}

.ranking-info-footer .info-icon {
  font-size: 0.9375rem;
  color: #3B82F6;
  font-weight: bold;
}

.balance-ranking-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--vibe-text-secondary);
  font-size: 0.8125rem;
}

/* Sub-Aba: Por Mês */
.balance-subtab-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 24px;
  box-shadow: var(--vibe-shadow-card);
}

.subtab-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.subtab-header-flex h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
  margin-bottom: 4px;
}

.month-selector-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.month-selector-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
}

.month-cards-comparison {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.month-shift-stat-box {
  padding: 16px;
  border-radius: var(--vibe-radius-md);
  border: 1px solid;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.box-shift-title {
  font-size: 0.875rem;
  font-weight: 700;
}

.box-stat-val strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--vibe-navy-primary);
}

.box-stat-val span {
  font-size: 0.75rem;
  color: var(--vibe-text-secondary);
}

.box-stat-diff {
  font-size: 0.6875rem;
  font-weight: 600;
  margin-top: 4px;
}

.diff-up { color: #D97706; }
.diff-down { color: #16A34A; }
.diff-neutral { color: #64748B; }

/* Sub-Aba: Detalhamento */
.detail-filters-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
}

.detail-table-wrapper {
  overflow-x: auto;
}

.detail-records-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-records-table th,
.detail-records-table td {
  padding: 10px 14px;
  font-size: 0.8125rem;
  border-bottom: 1px solid #F1F5F9;
  text-align: left;
}

.detail-records-table th {
  background: #FAFBFD;
  font-weight: 700;
  color: var(--vibe-text-secondary);
  border-bottom: 1px solid var(--vibe-border);
}

.status-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-block;
}

.status-pill-green {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.status-pill-amber {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.status-pill-gray {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

/* Sub-Aba: Comparativo */
.compare-stats-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.compare-stat-card {
  background: #FAFBFD;
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  padding: 18px;
}

.compare-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 6px 0 4px;
}

.compare-stat-sub {
  font-size: 0.75rem;
  color: var(--vibe-text-secondary);
}

.text-amber {
  color: #D97706;
}

.compare-guidelines-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--vibe-radius-md);
  padding: 20px;
  margin-top: 10px;
}

.compare-guidelines-box h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
  margin-bottom: 12px;
}

.compare-guidelines-box ul {
  padding-left: 20px;
  font-size: 0.8125rem;
  color: var(--vibe-text-primary);
  line-height: 1.6;
}

.compare-guidelines-box li {
  margin-bottom: 8px;
}

/* Responsividade do Equilíbrio de Turnos */
@media (max-width: 1200px) {
  .balance-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .balance-charts-grid,
  .balance-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .balance-cards-grid {
    grid-template-columns: 1fr;
  }
  .month-cards-comparison,
  .compare-stats-overview {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CALENDÁRIO DE EQUIPE — ESTILOS OFICIAIS CORPORATIVOS
   ========================================================================== */

/* Barra Superior Executiva */
.team-calendar-header-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--vibe-shadow-card);
}

.team-calendar-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-view-title {
  font-size: 1.5rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.team-view-subtitle {
  font-size: 0.875rem;
  color: var(--vibe-text-secondary);
  margin: 0;
}

.team-calendar-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.team-control-label {
  font-size: 0.6875rem;
  font-weight: var(--vibe-font-semibold);
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.team-select {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--vibe-radius-md);
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  font-size: 0.8125rem;
  font-weight: var(--vibe-font-semibold);
  cursor: pointer;
  outline: none;
  transition: border-color var(--vibe-transition-fast);
}

.team-select:focus {
  border-color: var(--vibe-blue-accent);
}

.team-nav-arrows {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--vibe-surface-hover);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-md);
  padding: 3px;
  margin-top: 14px;
}

.team-nav-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--vibe-text-primary);
  border-radius: var(--vibe-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--vibe-transition-fast);
}

.team-nav-btn:hover {
  background: var(--vibe-surface);
}

.team-nav-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.team-calendar-header-controls .btn-print {
  height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--vibe-radius-md);
}

/* Barra de Legenda Permanente e Filtros */
.team-calendar-filters-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--vibe-shadow-card);
  flex-wrap: wrap;
}

.team-legend-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.team-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: var(--vibe-font-semibold);
  color: var(--vibe-text-primary);
}

.legend-color-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}

.team-filters-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.team-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-filter-item label {
  font-size: 0.75rem;
  font-weight: var(--vibe-font-semibold);
  color: var(--vibe-text-secondary);
  white-space: nowrap;
}

.team-filter-select {
  height: 34px;
  padding: 0 10px;
  border-radius: var(--vibe-radius-md);
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.team-filter-select:focus {
  border-color: var(--vibe-blue-accent);
}

.team-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.team-search-input {
  height: 34px;
  padding: 0 32px 0 12px;
  border-radius: var(--vibe-radius-md);
  border: 1px solid var(--vibe-border);
  background: var(--vibe-surface);
  color: var(--vibe-text-primary);
  font-size: 0.8125rem;
  width: 190px;
  outline: none;
  transition: width var(--vibe-transition-fast), border-color var(--vibe-transition-fast);
}

.team-search-input:focus {
  width: 230px;
  border-color: var(--vibe-blue-accent);
}

.team-search-input-wrap .search-icon {
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  stroke: var(--vibe-text-secondary);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

/* Layout em 2 Colunas */
.team-calendar-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
  align-items: start;
}

/* Coluna Principal: Grade de Gantt */
.team-gantt-container-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  box-shadow: var(--vibe-shadow-card);
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
}

.team-gantt-board-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 760px;
}

/* Cabeçalho da Grade Gantt */
.team-gantt-header-row {
  display: flex;
  background: #F8FAFC;
  border-bottom: 1px solid var(--vibe-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.gantt-col-op-header {
  width: 160px;
  padding: 12px 12px;
  font-size: 0.75rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-right: 1px solid var(--vibe-border-subtle);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.gantt-col-shift-header {
  width: 50px;
  padding: 12px 4px;
  font-size: 0.75rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  border-right: 1px solid var(--vibe-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gantt-timeline-header-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.gantt-months-bar {
  display: flex;
  border-bottom: 1px solid var(--vibe-border-subtle);
  height: 32px;
}

.gantt-month-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-navy-primary);
  border-right: 1px solid var(--vibe-border-subtle);
  box-sizing: border-box;
  padding: 0 4px;
  white-space: nowrap;
}

.gantt-month-cell:last-child {
  border-right: none;
}

.gantt-ticks-bar {
  display: flex;
  height: 24px;
}

.gantt-month-ticks-wrap {
  position: relative;
  height: 100%;
  border-right: 1px solid var(--vibe-border-subtle);
  box-sizing: border-box;
}

.gantt-month-ticks-wrap:last-child {
  border-right: none;
}

.gantt-tick-item {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  font-size: 0.625rem;
  font-family: var(--vibe-font-mono);
  color: var(--vibe-text-secondary);
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 3px;
  transition: all var(--vibe-transition-fast);
}

.gantt-tick-item:hover {
  background: var(--vibe-surface-hover);
  color: var(--vibe-blue-accent);
}

.gantt-tick-item.selected {
  background: var(--vibe-navy-primary);
  color: #FFFFFF;
  font-weight: 700;
}

/* Corpo da Grade Gantt */
.team-gantt-body {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Linha de Hoje */
.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  border-left: 2px dashed #EF4444;
  z-index: 5;
  pointer-events: none;
}

.today-marker-pill {
  position: absolute;
  top: 4px;
  left: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.4);
}

/* Linha de Cada Operador */
.team-gantt-row {
  display: flex;
  border-bottom: 1px solid var(--vibe-border-subtle);
  transition: background var(--vibe-transition-fast);
  position: relative;
}

.team-gantt-row:hover {
  background: #FAFCFF;
}

.team-gantt-col-operator {
  width: 160px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 1px solid var(--vibe-border-subtle);
  flex-shrink: 0;
  background: var(--vibe-surface);
  z-index: 3;
}

.team-op-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--vibe-navy-secondary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--vibe-border);
}

.team-op-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-op-initials {
  font-size: 0.6875rem;
  font-weight: 700;
}

.team-op-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.team-op-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vibe-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-op-cargo {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-gantt-col-shift {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--vibe-border-subtle);
  flex-shrink: 0;
  background: var(--vibe-surface);
  z-index: 3;
}

.team-shift-pill {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-gantt-track {
  flex: 1;
  position: relative;
}

.gantt-month-dividers-bg {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
}

.gantt-divider-cell {
  height: 100%;
  border-right: 1px solid rgba(221, 230, 240, 0.6);
  box-sizing: border-box;
}

.gantt-divider-cell:last-child {
  border-right: none;
}

/* Barras de Ocorrência */
.team-gantt-bar {
  position: absolute;
  height: 26px;
  border-radius: 6px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #FFFFFF;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform var(--vibe-transition-fast), box-shadow var(--vibe-transition-fast);
  z-index: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.team-gantt-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.team-gantt-bar.selected {
  outline: 2px solid var(--vibe-navy-primary);
  outline-offset: 2px;
  z-index: 4;
}

.team-gantt-bar.clipped-start {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 3px solid rgba(0, 0, 0, 0.35);
}

.team-gantt-bar.clipped-end {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 3px solid rgba(0, 0, 0, 0.35);
}

.gantt-bar-title {
  font-weight: 700;
}

.gantt-bar-dates {
  opacity: 0.9;
  font-size: 0.625rem;
}

/* Estado Vazio */
.team-empty-state {
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--vibe-text-secondary);
}

.team-empty-state svg {
  width: 42px;
  height: 42px;
  stroke: var(--vibe-border);
  stroke-width: 1.5;
  fill: none;
}

.team-empty-state p {
  font-size: 0.9375rem;
  margin: 0;
}

/* Painel Lateral Direito */
.team-calendar-side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.team-side-card {
  background: var(--vibe-surface);
  border: 1px solid var(--vibe-border);
  border-radius: var(--vibe-radius-lg);
  padding: 18px;
  box-shadow: var(--vibe-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--vibe-border-subtle);
}

.side-card-icon {
  width: 16px;
  height: 16px;
  stroke: var(--vibe-navy-primary);
  stroke-width: 2.2;
  fill: none;
}

.side-card-title {
  font-size: 0.875rem;
  font-weight: var(--vibe-font-bold);
  color: var(--vibe-navy-primary);
  margin: 0;
}

/* Card 1: Detalhes do Dia */
.selected-day-banner {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: var(--vibe-radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-day-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--vibe-radius-md);
  background: #0284C7;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.selected-day-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.selected-day-info {
  display: flex;
  flex-direction: column;
}

.selected-day-weekday {
  font-size: 0.6875rem;
  color: #0369A1;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.selected-day-date {
  font-size: 0.875rem;
  color: #0C4A6E;
  font-weight: 700;
}

.daily-operators-count {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
}

.daily-operators-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.daily-op-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: #F8FAFC;
  border: 1px solid var(--vibe-border-subtle);
  border-radius: var(--vibe-radius-md);
  transition: border-color var(--vibe-transition-fast);
}

.daily-op-item:hover {
  border-color: #CAD6E4;
}

.daily-op-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--vibe-navy-secondary);
  color: var(--vibe-cyan-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.daily-op-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.daily-op-initials {
  font-size: 0.6875rem;
  font-weight: 700;
}

.daily-op-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.daily-op-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.daily-op-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--vibe-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.absence-type-icon {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
}

.daily-op-absence-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
}

.daily-op-period {
  color: var(--vibe-text-secondary);
}

.daily-op-shift-row {
  margin-top: 2px;
}

.daily-op-shift-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--vibe-radius-xs);
  display: inline-block;
}

.daily-op-note {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.3;
}

.daily-op-note.empty {
  color: #94A3B8;
  font-style: normal;
}

.btn-view-all-daily {
  background: none;
  border: none;
  color: var(--vibe-blue-accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  text-align: right;
}

.btn-view-all-daily:hover {
  text-decoration: underline;
}

/* Card 2: Resumo do Período */
.summary-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-metric-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--vibe-border-subtle);
}

.summary-metric-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--vibe-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-icon-box svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.summary-label-col {
  flex: 1;
}

.summary-type-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vibe-text-primary);
}

.summary-counts-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.summary-op-count {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--vibe-navy-primary);
}

.summary-period-count {
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
}

.summary-footer-info {
  background: #F8FAFC;
  border: 1px solid var(--vibe-border-subtle);
  border-radius: var(--vibe-radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.6875rem;
  color: var(--vibe-text-secondary);
  line-height: 1.4;
}

/* Responsividade de Tela */
@media (max-width: 1200px) {
  .team-calendar-main-layout {
    grid-template-columns: 1fr;
  }
  .team-calendar-side-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .team-calendar-header-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .team-calendar-side-panel {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   IMPRESSÃO OFICIAL CORPORATIVA — FORMATO A3/A4 PAISAGEM (@media print)
   ========================================================================== */
@page {
  size: A3 landscape;
  margin: 10mm 15mm 10mm 15mm;
}

@media print {
  /* Fundo limpo e alto contraste */
  html, body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Ocultar elementos exclusivos de navegação e telas */
  .vibe-sidebar,
  .vibe-topbar,
  .team-calendar-header-card,
  .team-calendar-filters-card,
  .team-calendar-side-panel,
  .vibe-modal-backdrop,
  .vibe-alert-banner,
  .vibe-tab-content:not(#tab-calendario-equipe) {
    display: none !important;
  }

  /* Exibir e expandir a aba Calendário de Equipe a 100% */
  .vibe-main,
  .vibe-content,
  #tab-calendario-equipe {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  .team-calendar-main-layout {
    display: block !important;
    width: 100% !important;
  }

  .team-gantt-container-card {
    border: 1px solid #CCCCCC !important;
    box-shadow: none !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .team-gantt-board-inner {
    overflow: visible !important;
    min-width: 100% !important;
    width: 100% !important;
  }

  /* Cabeçalho de Impressão */
  .team-print-header {
    display: block !important;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0D192B;
  }

  .team-print-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }

  .team-print-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .team-print-logo {
    font-size: 22pt;
    font-weight: 900;
    letter-spacing: 2px;
    color: #0D192B;
  }

  .team-print-title {
    font-size: 16pt;
    font-weight: 800;
    margin: 0;
    color: #0D192B;
  }

  .team-print-sub {
    font-size: 9pt;
    color: #555555;
    margin: 2px 0 0;
  }

  .team-print-meta {
    font-size: 8.5pt;
    color: #333333;
    text-align: right;
    line-height: 1.4;
  }

  .team-print-legend {
    display: flex;
    gap: 20px;
    background: #F3F4F6;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 8.5pt;
    font-weight: 600;
  }

  /* Quebra de Página Planejada sem cortar operadores */
  .team-gantt-row {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .team-gantt-header-row {
    position: static !important;
    page-break-after: avoid !important;
  }

  /* Forçar preservação de cores nas barras e badges */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .team-gantt-bar {
    box-shadow: none !important;
    font-size: 7.5pt !important;
    height: 22px !important;
  }

  .gantt-today-line {
    border-left: 2px dashed #DC2626 !important;
  }

  .today-marker-pill {
    background: #DC2626 !important;
  }
}

/* ==========================================================================
   TELA OFICIAL DE ACESSO E IDENTIFICAÇÃO DO USUÁRIO (VIBE SPLIT-SCREEN)
   ========================================================================== */

.vibe-access-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  background-color: #0D192B;
  color: #FFFFFF;
  position: relative;
  overflow-x: hidden;
  font-family: var(--vibe-font-sans);
}

.access-split-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Área Esquerda — Identidade Visual VIBE & Hero Industrial Oficial */
.access-brand-hero {
  flex: 0 0 58%;
  max-width: 58%;
  position: relative;
  background-color: #081426;
  display: flex;
  overflow: hidden;
}

.access-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}

/* Área Direita — Formulário de Identificação */
.access-form-panel {
  flex: 0 0 42%;
  max-width: 42%;
  background-color: #F8FAFC;
  background-image: radial-gradient(rgba(148, 163, 184, 0.25) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  box-sizing: border-box;
}

.access-form-box {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.access-form-header {
  margin-bottom: 4px;
}

.access-form-title {
  font-size: 32px;
  font-weight: 800;
  color: #0D192B;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin: 0;
}

.access-form-subtitle {
  font-size: 15px;
  color: #718198;
  margin-top: 6px;
  margin-bottom: 0;
}

.access-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.access-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.access-label {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 4px;
}

.access-label .required-star {
  color: #EF4444;
  font-weight: bold;
}

.access-label .optional-tag {
  color: #94A3B8;
  font-weight: 400;
  font-size: 12px;
}

.access-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.access-input-icon {
  position: absolute;
  left: 14px;
  color: #94A3B8;
  width: 20px;
  height: 20px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.access-input-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.access-input {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 44px;
  background-color: #FFFFFF;
  border: 1.5px solid #DDE6F0;
  border-radius: 10px;
  font-size: 14.5px;
  color: #0D192B;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.access-input::placeholder {
  color: #94A3B8;
}

.access-input:focus {
  border-color: #1877F2;
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}

.access-input.input-error {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14) !important;
}

.access-field-error {
  font-size: 12px;
  font-weight: 600;
  color: #DC2626;
  margin-top: 4px;
  line-height: 1.3;
}

.access-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
}

.access-select-chevron {
  position: absolute;
  right: 14px;
  color: #718198;
  width: 18px;
  height: 18px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.access-select-chevron svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.access-submit-btn {
  width: 100%;
  height: 50px;
  background: #1877F2;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.3);
  margin-top: 6px;
  font-family: inherit;
}

.access-submit-btn:hover {
  background: #0066EE;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(24, 119, 242, 0.4);
}

.access-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(24, 119, 242, 0.25);
}

.btn-arrow-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  transition: transform 0.2s ease;
}

.access-submit-btn:hover .btn-arrow-icon {
  transform: translateX(3px);
}

.access-form-footer {
  border-top: 1px solid #E2E8F0;
  padding-top: 14px;
  margin-top: 2px;
}

.access-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.privacy-lock-icon {
  color: #718198;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.privacy-lock-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.privacy-notice {
  font-size: 12px;
  color: #718198;
  line-height: 1.35;
  margin: 0;
}

.required-legend {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 3px;
  margin-bottom: 0;
}

/* Responsividade da Tela de Acesso */
@media (max-width: 1024px) {
  .access-split-container {
    flex-direction: column;
    min-height: 100vh;
  }

  .access-brand-hero {
    flex: 0 0 auto;
    max-width: 100%;
    height: 320px;
    min-height: 320px;
  }

  .access-hero-img {
    height: 100%;
    object-position: top left;
  }

  .access-form-panel {
    flex: 1;
    max-width: 100%;
    padding: 36px 24px;
  }
}

@media (max-width: 640px) {
  .access-brand-hero {
    height: 200px;
    min-height: 200px;
  }

  .access-hero-img {
    object-position: top left;
  }

  .access-form-title {
    font-size: 24px;
  }

  .access-form-panel {
    padding: 24px 16px;
  }
}

