/* Sky Informática - Gestão TI Portal */
:root {
  --primary: #0066CC;
  --dark-blue: #004494;
  --light-blue: #E8F4FD;
  --accent: #00AAFF;
  --sidebar-bg: #1a2332;
  --sidebar-hover: #243347;
  --text: #333333;
  --white: #ffffff;
  --surface: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #adb5bd;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --scroll-thumb: #c3cad4;
  --scroll-thumb-hover: #a8b1bd;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
  --transition: all 0.25s ease;
  /* Altura compartilhada do logo da sidebar e do .header pra borda inferior
     dos dois ficar na mesma linha (sem degrau na divisa). */
  --topbar-h: 72px;
  color-scheme: light;
}

/* Splash de boot: o script no <head> marca .boot-pending quando tudo indica que a
   sessão vai ser retomada (F5/reload logado) — o login fica escondido atrás deste
   véu até o app.js decidir (endBootSplash), evitando o flash da tela de login. */
.boot-pending #login-screen { display: none !important; }
#boot-splash { display: none; }
.boot-pending #boot-splash {
  display: flex;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  z-index: 2000;
}
.boot-splash-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--gray-300);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: boot-spin 0.8s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }

/* Tema Escuro */
:root[data-theme="dark"] {
  --primary: #3B8EEA;
  --dark-blue: #7FB8FF;
  --light-blue: #16283D;
  --accent: #33BBFF;
  --sidebar-bg: #10161f;
  --sidebar-hover: #1c2531;
  --text: #d7dce3;
  --surface: #1b2330;
  --gray-100: #242c39;
  --gray-200: #2f3947;
  --gray-300: #3b4657;
  --gray-500: #8b96a8;
  --scroll-thumb: #3b4657;
  --scroll-thumb-hover: #4d5a6e;
  --success: #34c77b;
  --warning: #f0b940;
  --danger: #f2565c;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.5);
  color-scheme: dark;
}
:root[data-theme="dark"] body { background: var(--gray-100); }
:root[data-theme="dark"] .eq-modal-overlay { background: rgba(0,0,0,0.7); }
:root[data-theme="dark"] .login-screen { background: var(--gray-100); }
:root[data-theme="dark"] thead,
:root[data-theme="dark"] .svc-table th { background: var(--sidebar-bg); }
:root[data-theme="dark"] .svc-table .row-overdue { background: rgba(242, 86, 92, 0.18); }
:root[data-theme="dark"] .svc-table .row-overdue:hover { background: rgba(242, 86, 92, 0.28); }
:root[data-theme="dark"] .aud-row-today { background: rgba(59, 142, 234, 0.12); }
:root[data-theme="dark"] .aud-row-today:hover { background: rgba(59, 142, 234, 0.22) !important; }
:root[data-theme="dark"] .aud-badge-success { background: rgba(52, 199, 123, 0.22); color: #6EE7B7; }
:root[data-theme="dark"] .aud-badge-danger { background: rgba(242, 86, 92, 0.22); color: #FCA5A5; }
:root[data-theme="dark"] .aud-badge-warning { background: rgba(240, 185, 64, 0.22); color: #FDE68A; }
:root[data-theme="dark"] .acr-badge-critical { background: #991B1B; color: #FCA5A5; }
:root[data-theme="dark"] .mapa-env { background: color-mix(in srgb, var(--env-color) 16%, var(--surface)); }
:root[data-theme="dark"] .mapa-client:hover { background: color-mix(in srgb, var(--env-color) 18%, var(--surface)); }

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Scrollbars finas e tematizadas em todo o portal. Chromium 121+ e Firefox
   usam as propriedades padrão; ::-webkit-scrollbar é fallback pro Safari. */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
::-webkit-scrollbar-corner { background: transparent; }

html { overflow-x: hidden; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--gray-100); color: var(--text); display: flex; min-height: 100vh; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Filho direto do body (flex): sem flex-grow ele encolhe pro tamanho de
   conteudo do .main em vez de ocupar a largura toda disponivel. Precisa de
   min-width:0 também — senão um descendente muito largo (o Gantt da Agenda
   de Implantações) força ESTE item flex a crescer acima da tela toda,
   e como o body tem overflow-x:hidden o excesso só fica cortado, sem rolar
   em lugar nenhum (nem o .gt-rolagem interno chega a ver overflow real). */
#app-shell { flex: 1; min-width: 0; }

/* Sidebar */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--white);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  /* Sem overflow aqui: o clipping cortava a metade externa do .toggle-btn
     (right: -15px). O scroll do menu fica no .nav. */
  color-scheme: dark;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-footer { display: none; }
.sidebar.collapsed .nav-icon { margin-right: 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 14px 0; }
.sidebar.collapsed .logo { padding: 0 12px; justify-content: center; }
.sidebar.collapsed .logo .logo-img { height: auto; width: 40px; }

.logo {
  padding: 0 20px;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  /* A sidebar não clipa mais (toggle-btn fica meio pra fora); evita o texto
     nowrap vazar durante a transição de largura do collapse/expand. */
  overflow: hidden;
}
.logo-text h2 { font-size: 18px; font-weight: 700; white-space: nowrap; }
.logo-img { height: 36px; width: auto; display: block; flex-shrink: 0; }
.logo-text small { font-size: 11px; opacity: 0.6; white-space: nowrap; }

.nav {
  flex: 1;
  padding: 12px 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.22); }
.nav:hover::-webkit-scrollbar-thumb,
.nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }
.nav-item {
  display: flex; align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  gap: 12px;
  white-space: nowrap;
}
.nav-item:hover { background: var(--sidebar-hover); }
.nav-item.active { background: var(--sidebar-hover); border-left-color: var(--accent); }
.nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-label { font-size: 14px; }

/* Nav group (collapsible product section) */
.nav-group { margin: 4px 0; }
.nav-group-toggle {
  display: flex; align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  gap: 12px;
  white-space: nowrap;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  border-left: 3px solid transparent;
  user-select: none;
}
.nav-group-toggle:hover { background: var(--sidebar-hover); }
.nav-group-toggle .nav-arrow {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.25s ease;
}
.nav-group.collapsed .nav-group-toggle .nav-arrow { transform: rotate(-90deg); }
/* Grupo contém a página ativa: mantém destaque mesmo com o grupo fechado */
.nav-group.has-active .nav-group-toggle { color: var(--white); border-left-color: var(--accent); }
.nav-group.has-active .nav-group-toggle .nav-icon { color: var(--accent); }
.nav-icon i { font-size: 16px; }
.nav-group-items {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.nav-group-items.open { max-height: 600px; }
.nav-item.sub { padding-left: 40px; }
.sidebar.collapsed .nav-group-toggle .nav-label,
.sidebar.collapsed .nav-group-toggle .nav-arrow { display: none; }
.sidebar.collapsed .nav-group-toggle { justify-content: center; padding: 14px 0; }
.sidebar.collapsed .nav-item.sub { padding-left: 0; justify-content: center; }

/* Tooltip nativo (title) ajuda, mas adicionamos um balão visual pra ficar mais claro
   quando a sidebar está recolhida e só os ícones aparecem. */
.sidebar.collapsed .nav-item,
.sidebar.collapsed .nav-group-toggle { position: relative; }
.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-group-toggle:hover::after {
  content: attr(data-title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--sidebar-hover);
  color: var(--white);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: var(--shadow-hover);
  z-index: 200;
  pointer-events: none;
}

/* Acessibilidade: foco visível ao navegar via teclado (Tab) */
.nav-item:focus-visible,
.nav-group-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  opacity: 0.5;
  white-space: nowrap;
  overflow: hidden;
}

.toggle-btn {
  position: absolute;
  top: 30px; right: -15px;
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  border-radius: 9px;
  color: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  z-index: 101;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 0 0 3px var(--gray-100);
  transition: var(--transition), transform 0.2s ease, box-shadow 0.2s ease;
}
.toggle-btn i { transition: transform 0.3s ease; }
.toggle-btn:hover {
  background: linear-gradient(135deg, var(--dark-blue), var(--primary));
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4), 0 0 0 3px var(--gray-100);
}
.toggle-btn:active { transform: scale(0.95); }
.sidebar.collapsed .toggle-btn i { transform: rotate(180deg); }

/* Main */
.main {
  flex: 1;
  min-width: 0; /* sem isso, um filho muito largo (ex.: o Gantt da Agenda de
    Implantações) força este item flex a crescer em vez de deixar seu próprio
    conteúdo rolar — item flex não encolhe abaixo do tamanho intrínseco por padrão */
  margin-left: 260px;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
}
.sidebar.collapsed ~ .main { margin-left: 64px; }

.header {
  background: var(--surface);
  padding: 0 32px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header h1 { font-size: 22px; color: var(--dark-blue); }
.header-right { display: flex; align-items: center; gap: 20px; }
.header-info { font-size: 13px; color: var(--gray-500); }

/* Theme Toggle */
.theme-toggle-btn {
  position: relative;
  width: 52px; height: 28px;
  border: none; border-radius: 999px;
  padding: 0;
  background: linear-gradient(135deg, var(--dark-blue), var(--primary));
  cursor: pointer;
  display: flex; align-items: center;
  transition: background 0.4s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.theme-toggle-btn:hover { box-shadow: inset 0 1px 3px rgba(0,0,0,0.2), 0 0 0 3px var(--gray-200); }
.theme-toggle-btn::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.35s cubic-bezier(0.68, -0.4, 0.27, 1.4);
}
.theme-toggle-icon {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 13px;
  transition: opacity 0.25s ease, color 0.25s ease;
}
.theme-toggle-icon-sun { left: 7px; color: #FFD24C; opacity: 1; }
.theme-toggle-icon-moon { right: 7px; color: rgba(255,255,255,0.55); opacity: 0.6; }
:root[data-theme="dark"] .theme-toggle-btn {
  background: linear-gradient(135deg, #1c2531, #10161f);
}
:root[data-theme="dark"] .theme-toggle-btn::before { transform: translateX(24px); }
:root[data-theme="dark"] .theme-toggle-icon-sun { opacity: 0.5; color: rgba(255,255,255,0.4); }

/* Sino de notificações de ausência (Líder TI / Coordenador) */
.notif-bell-wrap { position: relative; }
.notif-bell-btn {
  position: relative;
  width: 36px; height: 36px;
  border: 1px solid var(--gray-300); border-radius: 8px;
  background: var(--gray-100); color: var(--gray-600);
  font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.notif-bell-btn:hover { background: var(--gray-200); }
.notif-bell-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: #DC2626; color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.notif-bell-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 320px; max-height: 380px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--gray-200);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 50; animation: fadeInUp .2s ease;
}
.notif-bell-panel-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--gray-500);
  padding: 12px 14px 8px; text-transform: uppercase; letter-spacing: .3px;
}
.notif-bell-marcar-todas {
  border: none; background: none; padding: 0; cursor: pointer;
  font-size: 11px; font-weight: 600; color: var(--primary);
  text-transform: none; letter-spacing: normal; white-space: nowrap;
}
.notif-bell-marcar-todas:hover { text-decoration: underline; }
.notif-bell-marcar-todas:disabled {
  color: var(--gray-400); cursor: default; text-decoration: none;
}
.notif-bell-list { display: flex; flex-direction: column; }
.notif-bell-empty { padding: 16px 14px 20px; font-size: 13px; color: var(--gray-500); }
.notif-bell-item { padding: 10px 14px; border-top: 1px solid var(--gray-100); font-size: 13px; }
.notif-bell-item-head { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--dark-blue); }
.notif-bell-item-head i { font-size: 11px; }
.notif-bell-item-head .agendada { color: #0F766E; }
.notif-bell-item-head .cancelada { color: #B91C1C; }
.notif-bell-item-head .bug { color: #B91C1C; }
.notif-bell-item-head .melhoria { color: #1D4ED8; }
.notif-bell-item-clicavel { cursor: pointer; }
.notif-bell-item-clicavel:hover { background: var(--gray-50, rgba(148,163,184,.12)); }
.notif-bell-item-detail { color: var(--text); margin-top: 2px; }
.notif-bell-item-when { color: var(--gray-500); font-size: 11px; }
.notif-bell-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.notif-bell-item-lida { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gray-500); cursor: pointer; white-space: nowrap; }
.notif-bell-item-lida input[type=checkbox] { width: 13px; height: 13px; cursor: pointer; accent-color: var(--primary); }
@media (max-width: 480px) {
  .notif-bell-panel { position: fixed; top: var(--topbar-h); right: 8px; left: 8px; width: auto; }
}
:root[data-theme="dark"] .theme-toggle-icon-moon { opacity: 1; color: #A6C8FF; }

/* Edit Mode Toggle */
.edit-mode-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--gray-300);
  background: var(--gray-100); color: var(--gray-600); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.3s;
}
.edit-mode-btn:hover { background: var(--gray-200); }
.edit-mode-btn.active {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8); color: var(--white);
  border-color: #1D4ED8; box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.edit-mode-btn.active:hover { background: linear-gradient(135deg, #2563EB, #1E40AF); }

/* Hide all edit controls by default, show when .edit-mode is on body */
.eq-action-btn,
.eq-add-btn,
.env-card-add,
.scd-stat-actions,
.scd-stat-add,
.srv-actions-cell,
.forn-actions,
.fer-detail-actions,
.links-add-btn,
.infra-srv-add,
.infra-client-add,
.infra-client-del,
#srv-btn-add,
#forn-btn-add,
#eq-btn-add,
#scd-env-add,
#scd-lic-add,
#fer-btn-add,
#ps-prod-add,
#ps-svc-add,
#cad-btn-add,
.cad-act-btn,
.cad-th-actions,
.cad-td-actions,
.ips-import-controls { display: none !important; }

body.edit-mode .eq-action-btn,
body.edit-mode .eq-add-btn,
body.edit-mode .scd-stat-actions,
body.edit-mode .srv-actions-cell,
body.edit-mode .forn-actions,
body.edit-mode .fer-detail-actions,
body.edit-mode .links-add-btn,
body.edit-mode #cad-btn-add,
body.edit-mode .cad-th-actions,
body.edit-mode .cad-td-actions { display: flex !important; }
body.edit-mode .ips-import-controls { display: flex !important; }
body.edit-mode .cad-act-btn { display: inline-flex !important; align-items: center; justify-content: center; }
body.edit-mode .cad-th-actions,
body.edit-mode .cad-td-actions { display: table-cell !important; }
body.edit-mode #srv-btn-add,
body.edit-mode #forn-btn-add,
body.edit-mode #eq-btn-add,
body.edit-mode #fer-btn-add,
body.edit-mode #ps-prod-add,
body.edit-mode #ps-svc-add { display: flex !important; }
body.edit-mode .env-card-add,
body.edit-mode #scd-env-add,
body.edit-mode #scd-lic-add,
body.edit-mode .scd-stat-add { display: flex !important; }
body.edit-mode .infra-srv-add,
body.edit-mode .infra-client-add { display: inline-flex !important; }
body.edit-mode .infra-client-del { display: inline-block !important; }

/* Modo Edição escopado por página: usuário com permissão "Visualizar" numa página
   (classe .page-view-only, aplicada por applyPageEditScoping() em app.js) não vê os
   controles de edição daquela página mesmo com o Modo Edição ligado em outras. */
body.edit-mode .page-view-only .eq-action-btn,
body.edit-mode .page-view-only .eq-add-btn,
body.edit-mode .page-view-only .scd-stat-actions,
body.edit-mode .page-view-only .srv-actions-cell,
body.edit-mode .page-view-only .forn-actions,
body.edit-mode .page-view-only .fer-detail-actions,
body.edit-mode .page-view-only .links-add-btn,
body.edit-mode .page-view-only #cad-btn-add,
body.edit-mode .page-view-only .cad-act-btn,
body.edit-mode .page-view-only .cad-th-actions,
body.edit-mode .page-view-only .cad-td-actions,
body.edit-mode .page-view-only #srv-btn-add,
body.edit-mode .page-view-only #forn-btn-add,
body.edit-mode .page-view-only #eq-btn-add,
body.edit-mode .page-view-only #fer-btn-add,
body.edit-mode .page-view-only #ps-prod-add,
body.edit-mode .page-view-only #ps-svc-add,
body.edit-mode .page-view-only .env-card-add,
body.edit-mode .page-view-only #scd-env-add,
body.edit-mode .page-view-only #scd-lic-add,
body.edit-mode .page-view-only .scd-stat-add,
body.edit-mode .page-view-only .infra-srv-add,
body.edit-mode .page-view-only .infra-client-add,
body.edit-mode .page-view-only .infra-client-del,
body.edit-mode .page-view-only .ips-import-controls { display: none !important; }

/* Coluna Ações do Infra SKY: o <col> reserva 110px mesmo com th/td escondidos
   (table-layout: fixed), então precisa ser colapsado fora do Modo Edição. */
body:not(.edit-mode) col.isk-col-actions,
body.edit-mode .page-view-only col.isk-col-actions { visibility: collapse; width: 0 !important; }

.content { padding: 28px 32px; }

/* Page sections */
.page { display: none; animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }

/* Cards grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-card .stat-icon { font-size: 24px; margin-bottom: 8px; opacity: 0.8; }
.stat-card .value { font-size: 32px; font-weight: 700; color: var(--dark-blue); }
.stat-card .label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

.env-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.env-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.env-card:hover { box-shadow: var(--shadow-hover); }
.env-card-header {
  background: linear-gradient(135deg, var(--primary), var(--dark-blue));
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.env-card-header h3 { font-size: 16px; }
.env-card-actions { display: flex; gap: 4px; }
.env-card-actions .eq-action-btn { color: var(--white); background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); }
.env-card-actions .eq-action-btn:hover { background: rgba(255,255,255,0.3); }
.env-card-body { padding: 16px 20px; }
.env-card-body .detail { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--gray-200); }
.env-card-body .detail:last-child { border-bottom: none; }
.env-card-body .detail span:first-child { flex-shrink: 0; }
.env-card-body .detail span:last-child { font-weight: 600; color: var(--dark-blue); text-align: right; }

/* Tables */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 24px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--dark-blue); color: var(--white); }
th { padding: 12px 16px; text-align: left; font-weight: 600; white-space: nowrap; }
td { padding: 10px 16px; border-bottom: 1px solid var(--gray-200); }
tbody tr:nth-child(even) { background: var(--gray-100); }
tbody tr:hover { background: var(--light-blue); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-right: 6px; }
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--light-blue);
  color: var(--primary);
}

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn {
  padding: 10px 24px;
  border: none;
  background: var(--surface);
  color: var(--text);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}
.tab-btn:hover { background: var(--light-blue); }
.tab-btn.active { background: var(--surface); border-bottom-color: var(--primary); color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Equipe */
.eq-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.isk-stats-grid {
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 900px) {
  .isk-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .isk-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.eq-sum-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}
.eq-sum-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.eq-sum-card-clickable { cursor: pointer; }
.eq-sum-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--white);
  margin: 0 auto 10px;
}
.eq-sum-num { font-size: 28px; font-weight: 800; color: var(--dark-blue); }
.eq-sum-lbl { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* Infra Sky — Visão Geral: cards compactos, layout horizontal (escopado por id, não afeta .eq-summary/.eq-sum-card em outras páginas) */
#infra-sky-visao-root .eq-sum-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid transparent;
}
#infra-sky-visao-root .eq-sum-card:hover {
  border-color: color-mix(in srgb, var(--dark-blue) 25%, transparent);
}
#infra-sky-visao-root .eq-sum-card-clickable:hover {
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}
#infra-sky-visao-root .eq-sum-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  font-size: 14px;
  margin: 0;
  flex-shrink: 0;
}
#infra-sky-visao-root .eq-sum-text { min-width: 0; }
#infra-sky-visao-root .eq-sum-num { font-size: 20px; line-height: 1.1; }
#infra-sky-visao-root .eq-sum-lbl {
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq-cat-section { margin-bottom: 28px; }
.eq-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  margin-bottom: 16px;
}
.eq-cat-header i { font-size: 18px; }
.eq-cat-header h3 { font-size: 16px; color: var(--dark-blue); flex: 1; }
.eq-cat-count {
  background: var(--gray-100);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark-blue);
}

.eq-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}
.eq-member-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}
.eq-member-card:hover { box-shadow: var(--shadow-hover); transform: translateX(4px); }
.eq-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.eq-avatar-img {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--gray-200);
}
.eq-name { font-size: 14px; font-weight: 700; color: var(--dark-blue); }
.eq-cargo { font-size: 12px; font-weight: 600; margin-top: 2px; }

/* Organograma
   Dois estilos de conector, cada um onde funciona melhor:
   - SVG (org-connectors-svg, desenhado por drawOrgConnectors em js/organograma.js) para as
     junções em "leque" (Diretor->Coordenador->Líderes/Equipe direta), onde a posição
     horizontal de cada card varia — precisa ser calculado pela posição real do DOM pra nunca
     ficar torto.
   - Trilho CSS estático (.org-team) para as listas verticais de cada time — todos os itens
     já compartilham o mesmo X, então uma linha fixa nunca desalinha, sem precisar de JS. */
.org-chart {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding: 32px 16px 56px;
}
.org-connectors-svg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}
.org-connector-line {
  fill: none;
  stroke: var(--gray-300);
  stroke-width: 2.5px;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.org-level { display: flex; justify-content: center; }
.org-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  min-width: 260px;
  position: relative;
  z-index: 1;
}
.org-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.org-card .eq-avatar,
.org-card .eq-avatar-img { width: 56px; height: 56px; font-size: 16px; }
.org-card .eq-name { font-size: 16px; }
.org-card .eq-cargo { font-size: 13px; }
.org-level-root .org-card { border: 2px solid var(--danger); }

/* Sempre numa linha só (com scroll horizontal se precisar) — o SVG desenha uma linha reta
   por par pai/filho, então se um branch "quebrasse" pra linha de baixo, a linha atravessaria
   por cima dos cards da linha de cima até chegar nele. */
.org-level-branches {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  flex-wrap: nowrap;
  width: 100%;
  overflow-x: auto;
  padding: 4px 4px 16px;
}
.org-branch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.org-branch .org-card { border: 2px solid var(--primary); min-width: 240px; }

.org-team {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  padding-left: 30px;
}
.org-team::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 11px;
  bottom: 18px;
  width: 2px;
  background: var(--gray-300);
  border-radius: 2px;
}
.org-team-item { position: relative; }
.org-team-item::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 50%;
  width: 19px;
  height: 2px;
  background: var(--gray-300);
  transform: translateY(-1px);
}
.org-team-item .org-card { min-width: 220px; padding: 12px 18px; }
.org-team-item .org-card .eq-avatar,
.org-team-item .org-card .eq-avatar-img { width: 40px; height: 40px; font-size: 13px; }
.org-team-item .org-card .eq-name { font-size: 14px; }
.org-team-item .org-card .eq-cargo { font-size: 12px; }

.org-card-clickable { cursor: pointer; }
.org-joker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
  animation: orgJokerFadeIn 0.15s ease;
}
@keyframes orgJokerFadeIn { from { opacity: 0; } to { opacity: 1; } }
.org-joker-img {
  max-width: min(90vw, 380px);
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.org-branch-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.org-empty {
  text-align: center;
  color: var(--gray-500);
  padding: 40px;
}

@media (max-width: 900px) {
  .org-chart { gap: 40px; }
  .org-team { padding-left: 26px; }
}

/* Equipe CRUD */
.eq-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.eq-top-bar .eq-summary { flex: 1; margin-bottom: 0; }
.eq-add-btn {
  background: linear-gradient(135deg, #10B981, #059669);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}
.eq-add-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(16,185,129,0.4); }

.eq-member-card { position: relative; }
.eq-actions {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  gap: 4px;
}
.eq-member-card:hover .eq-actions { display: flex; }
.eq-action-btn {
  width: 30px; height: 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  transition: var(--transition);
}
.eq-edit-btn { background: #EFF6FF; color: #3B82F6; }
.eq-edit-btn:hover { background: #3B82F6; color: var(--white); }
.eq-del-btn { background: #FEF2F2; color: #EF4444; }
.eq-del-btn:hover { background: #EF4444; color: var(--white); }

/* Modal */
.eq-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.eq-modal {
  background: var(--surface);
  border-radius: 16px;
  width: 500px;
  max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
  /* Header e botões de ação sempre visíveis: o modal vira coluna flex com altura
     limitada e só o miolo (.eq-form-fields/.eq-modal-body/.cad-form-grid) rola. */
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.eq-modal > form { display: flex; flex-direction: column; min-height: 0; }
.eq-modal-header, .eq-form-actions { flex-shrink: 0; }
.eq-form-fields, .eq-modal-body, .cad-form-grid { overflow-y: auto; min-height: 0; }
.eq-modal-sm { width: 400px; max-width: 95vw; }
.p213-modal-wide { width: 800px; max-width: 95vw; }
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
.eq-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.eq-modal-header h3 { font-size: 18px; color: var(--dark-blue); }
.eq-modal-close {
  width: 32px; height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  transition: var(--transition);
}
.eq-modal-close:hover { background: #FEF2F2; color: #EF4444; }

.eq-form-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 24px 0;
}
.eq-form-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--gray-500);
  overflow: hidden;
  border: 3px solid var(--gray-200);
}
.eq-form-avatar img { width: 100%; height: 100%; object-fit: cover; }
.eq-form-photo-btn {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.eq-form-photo-btn:hover { text-decoration: underline; }

.eq-form-fields { padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.eq-field label { display: block; font-size: 12px; font-weight: 700; color: var(--gray-500); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.eq-field input, .eq-field select, .eq-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
  font-family: inherit;
}
.eq-field input:focus, .eq-field select:focus, .eq-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
.eq-field input:disabled { background: var(--gray-100); color: var(--gray-500); cursor: not-allowed; }
.eq-field-hint { display: block; font-size: 11px; color: var(--gray-500); margin-top: 4px; }

.isk-multiselect-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: var(--surface);
}
.isk-multiselect-option { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.isk-multiselect-option input { width: auto; }
.isk-multiselect-empty { font-size: 13px; color: var(--gray-500); }

.eq-form-actions {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.eq-btn-cancel {
  padding: 10px 20px;
  border: 2px solid var(--gray-200);
  background: var(--surface);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
}
.eq-btn-cancel:hover { border-color: var(--gray-300); color: var(--text); }
.eq-btn-save {
  padding: 10px 24px;
  border: none;
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.eq-btn-save:hover { background: var(--dark-blue); }
.eq-btn-delete {
  padding: 10px 24px;
  border: none;
  background: #EF4444;
  color: var(--white);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.eq-btn-delete:hover { background: #DC2626; }
.eq-confirm-text { padding: 16px 24px; font-size: 14px; color: var(--text); }

/* Produtos e Serviços */
.ps-hero {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.ps-hero h2 { font-size: 22px; color: var(--dark-blue); }
.ps-hero p { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.ps-hero-stat { text-align: center; }
.ps-hero-num { font-size: 36px; font-weight: 800; color: var(--primary); line-height: 1; }
.ps-hero-lbl { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

.ps-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}
.ps-prod-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.ps-prod-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.ps-prod-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.ps-prod-info { flex: 1; }
.ps-prod-name { font-size: 15px; font-weight: 700; color: var(--dark-blue); }
.ps-prod-clients { font-size: 13px; color: var(--gray-500); margin-top: 3px; }
.ps-prod-clients strong { color: var(--dark-blue); font-size: 18px; }
.ps-prod-bar-wrap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gray-100);
}
.ps-prod-bar {
  height: 100%;
  border-radius: 0 3px 0 0;
  transition: width 0.6s ease;
}

.ps-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}
.ps-svc-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}
.ps-svc-card { position: relative; }
.ps-svc-card:hover { box-shadow: var(--shadow-hover); transform: translateX(4px); }
.ps-svc-del { position: absolute; top: 8px; right: 8px; }
.ps-prod-actions { position: absolute; top: 8px; right: 8px; gap: 4px; }
.ps-svc-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.ps-svc-text { font-size: 14px; color: var(--text); }

/* Ferias */
.fer-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.fer-sum-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.fer-sum-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.fer-sum-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--white); flex-shrink: 0;
}
.fer-sum-team .fer-sum-icon { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.fer-sum-active .fer-sum-icon { background: linear-gradient(135deg, #F59E0B, #D97706); }
.fer-sum-next .fer-sum-icon { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.fer-sum-total .fer-sum-icon { background: linear-gradient(135deg, #10B981, #059669); }
.fer-sum-value { font-size: 20px; font-weight: 700; color: var(--dark-blue); }
.fer-sum-label { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

.fer-timeline-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.fer-timeline-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
}
.fer-timeline-header h3 { font-size: 16px; color: var(--dark-blue); }
.fer-timeline-header h3 i { margin-right: 8px; opacity: 0.6; }
.fer-subsection-title { font-size: 16px; color: var(--gray-500); margin: 28px 0 16px; }
.fer-subsection-title i { margin-right: 8px; opacity: 0.6; }
.fer-today-badge {
  background: #EF4444;
  color: var(--white);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.fer-today-badge i { margin-right: 4px; }

.fer-month-scale {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-100);
}
.fer-month-scale-spacer { width: 200px; flex-shrink: 0; }
.fer-month-scale-track { flex: 1; display: flex; margin-right: 20px; }
.fer-month-col {
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark-blue);
  border-right: 1px solid var(--gray-200);
}
.fer-month-col:last-child { border-right: none; }

.fer-lanes { padding: 8px 0; }
.fer-lane {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.fer-lane:last-child { border-bottom: none; }
.fer-lane-label {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 20px;
}
.fer-lane-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.fer-lane-name strong { display: block; font-size: 14px; color: var(--text); }
.fer-lane-name span { font-size: 11px; color: var(--gray-500); }

.fer-lane-track {
  flex: 1;
  height: 36px;
  position: relative;
  margin-right: 20px;
  background: var(--gray-100);
  border-radius: 8px;
  overflow: hidden;
}
.fer-week-marker {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--gray-200);
  z-index: 1;
}
.fer-today-line {
  position: absolute;
  top: -4px; bottom: -4px;
  width: 2px;
  background: #EF4444;
  z-index: 3;
  border-radius: 2px;
}
.fer-today-line::after {
  content: '';
  position: absolute;
  top: 0; left: -3px;
  width: 8px; height: 8px;
  background: #EF4444;
  border-radius: 50%;
}
.fer-bar {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s ease;
  cursor: default;
}
.fer-bar:hover { filter: brightness(1.1); transform: scaleY(1.15); }
.fer-bar-active { box-shadow: 0 0 0 3px rgba(245,158,11,0.4); animation: fer-pulse 2s infinite; }
@keyframes fer-pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(245,158,11,0.3); } 50% { box-shadow: 0 0 0 6px rgba(245,158,11,0.15); } }
.fer-bar-past { opacity: 0.6; }
.fer-bar-text { color: var(--white); font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.2); white-space: nowrap; }

.fer-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.fer-detail-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.fer-detail-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.fer-detail-stripe { height: 5px; }
.fer-detail-body { padding: 18px; }
.fer-detail-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.fer-detail-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.fer-detail-name { font-size: 16px; font-weight: 700; color: var(--dark-blue); }
.fer-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.fer-status-done { background: #f1f5f9; color: #64748b; }
.fer-status-active { background: #fef3c7; color: #92400e; }
.fer-status-pending { background: #ede9fe; color: #5b21b6; }
.fer-detail-dates { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text); }
.fer-detail-dates i { color: var(--gray-500); margin-right: 6px; width: 16px; text-align: center; }

/* Links */
.links-section { margin-bottom: 28px; }
.links-section h3 { font-size: 16px; color: var(--dark-blue); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}
.link-card {
  background: var(--surface);
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}
.link-card { position: relative; }
.link-card:hover { box-shadow: var(--shadow-hover); transform: translateX(4px); }
.link-copy-card:hover .link-copy-icon { opacity: 1; }
.link-copy-icon { opacity: 0; color: var(--primary); font-size: 15px; transition: opacity .15s; flex-shrink: 0; }
.link-icon { font-size: 20px; }
.link-actions { position: absolute; top: 6px; right: 6px; gap: 4px; }
@keyframes fadeInUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* Fornecedores */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.vendor-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border-top: 4px solid var(--primary);
}
.forn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.forn-top .section-title { margin-bottom: 0; }
.vendor-card { position: relative; }
.forn-actions {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  gap: 4px;
}
.vendor-card:hover .forn-actions { display: flex; }
.vendor-card h4 { color: var(--dark-blue); margin-bottom: 4px; }
.vendor-card .empresa { font-size: 13px; color: var(--gray-500); margin-bottom: 12px; }
.vendor-card .info { font-size: 14px; margin-bottom: 6px; }
.vendor-card .info span { color: var(--gray-500); }

.section-title { font-size: 18px; color: var(--dark-blue); margin-bottom: 16px; }

/* License cards */
.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 20px;
}
.license-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.license-card h4 { color: var(--dark-blue); margin-bottom: 12px; font-size: 15px; }
.license-card .env-card-actions .eq-action-btn { color: var(--gray-500); background: var(--gray-100); border-color: var(--gray-300); }
.license-card .env-card-actions .eq-action-btn:hover { background: var(--gray-200); }

/* Stat card edit */
.scd-stat-card { position: relative; cursor: default; }
.scd-stat-actions { position: absolute; top: 8px; right: 8px; gap: 4px; opacity: 0; transition: opacity 0.2s; }
body.edit-mode .scd-stat-card:hover .scd-stat-actions { opacity: 1; }
.scd-stat-edit, .scd-stat-del { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gray-300); background: var(--surface); color: var(--gray-500); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.scd-stat-edit:hover { background: var(--gray-100); color: var(--primary); }
.scd-stat-del:hover { background: #FEE2E2; color: #EF4444; border-color: #EF4444; }
.scd-stat-input { width: 80px; font-size: 32px; font-weight: 700; color: var(--dark-blue); border: 1px solid var(--primary); border-radius: 6px; text-align: center; padding: 2px; outline: none; background: #f0f7ff; }
.license-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--gray-200); }
.srv-actions-cell { display: flex; gap: 4px; justify-content: center; }
.cli-obs-cell { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gray-500); }
.license-row:last-child { border-bottom: none; }
.license-row .count { font-weight: 700; color: var(--primary); }

/* Infra client list */
.client-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.client-tag { background: var(--light-blue); color: var(--primary); padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.client-tag-users { background: var(--primary); color: var(--white); border-radius: 8px; padding: 0 6px; margin-left: 4px; font-size: 11px; font-weight: 600; }

.server-section { margin-bottom: 32px; }
.server-section h3 { font-size: 16px; color: var(--dark-blue); margin-bottom: 12px; }

/* Year selector */
.ind-year-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.ind-year-btn {
  padding: 10px 24px;
  border: 2px solid var(--gray-200);
  background: var(--surface);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
}
.ind-year-btn:hover { border-color: var(--primary); color: var(--primary); }
.ind-year-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.ind-year-btn i { margin-right: 6px; }

/* Indicadores - Modern */
.ind-tab {
  padding: 10px 22px;
  border: none;
  background: var(--surface);
  color: var(--gray-500);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ind-tab:hover { background: var(--light-blue); color: var(--primary); }
.ind-tab.active { background: var(--primary); color: var(--white); }
.ind-tab i { font-size: 12px; }

.ind-hero {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.ind-hero h2 { font-size: 22px; color: var(--dark-blue); }
.ind-hero p { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.ind-hero-badge {
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.ind-hero-badge small { display: block; font-size: 13px; font-weight: 500; color: var(--gray-500); margin-top: 4px; }

.ind-formation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: 14px;
}

/* Mini stat card */
.ms-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
  transition: var(--transition);
}
.ms-card { position: relative; }
.ms-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.ms-card-actions { position: absolute; top: 8px; right: 8px; gap: 4px; }
.ms-card-actions button { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 12px; padding: 4px; border-radius: 4px; }
.ms-card-actions button:hover { color: var(--primary); background: var(--gray-100); }
.ms-card-actions .ms-del-btn:hover { color: #EF4444; }

/* Botões de edição genéricos (gráficos, serviços, produtos, fechamento) */
.ind-chart-block, .ind-svc-modern, .ind-fech-card, .ind-prod-banner { position: relative; }
.ind-edit-actions { position: absolute; top: 8px; right: 8px; gap: 4px; z-index: 2; }
.ie-btn { background: var(--surface); border: 1px solid var(--gray-200); cursor: pointer; color: var(--gray-500); font-size: 12px; width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.ie-btn:hover { color: var(--primary); }
.ie-btn.ie-del:hover { color: #EF4444; border-color: #EF4444; }
.ind-edit-actions-light .ie-btn { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.4); color: var(--white); }
.ind-edit-actions-light .ie-btn:hover { background: var(--surface); color: var(--primary); }
.ind-chart-add:hover, .ind-svc-add:hover, .ind-fech-add:hover, .ind-prod-add-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Controles dos Indicadores: escondidos em Modo Visualização, visíveis em Modo Edição */
.ms-card-actions, .ms-card-add,
.ind-edit-actions, .ind-chart-add, .ind-svc-add, .ind-fech-add, .ind-prod-add-btn { display: none !important; }
body.edit-mode .ms-card-add,
body.edit-mode .ind-chart-add,
body.edit-mode .ind-svc-add,
body.edit-mode .ind-fech-add { display: flex !important; }
body.edit-mode .ind-prod-add-btn { display: block !important; }
body.edit-mode .ms-card:hover .ms-card-actions,
body.edit-mode .ind-chart-block:hover .ind-edit-actions,
body.edit-mode .ind-svc-modern:hover .ind-edit-actions,
body.edit-mode .ind-fech-card:hover .ind-edit-actions,
body.edit-mode .ind-prod-banner:hover .ind-edit-actions { display: flex !important; }
.ms-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin: 0 auto 10px;
}
.ms-value { font-size: 26px; font-weight: 800; color: var(--dark-blue); }
.ms-label { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* Vertical chart */
.vc-wrap { width: 100%; }
.vc-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.vc-total { font-size: 22px; font-weight: 800; color: var(--dark-blue); }
.vc-total small { font-size: 12px; font-weight: 500; color: var(--gray-500); }
.vc-avg { font-size: 12px; color: var(--gray-500); background: var(--gray-100); padding: 3px 10px; border-radius: 10px; }
.vc-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
}
.vc-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.vc-val { font-size: 10px; font-weight: 700; color: var(--dark-blue); margin-bottom: 4px; white-space: nowrap; }
.vc-bar-wrap {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.vc-bar {
  width: 80%;
  max-width: 32px;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s cubic-bezier(0.4,0,0.2,1);
  min-height: 2px;
  cursor: default;
}
.vc-bar:hover { filter: brightness(1.15); transform: scaleX(1.15); }
.vc-lbl { font-size: 10px; color: var(--gray-500); margin-top: 4px; font-weight: 600; }
.vc-empty { color: var(--gray-500); font-size: 13px; padding: 20px 0; text-align: center; }
.vc-col-clickable { cursor: pointer; border-radius: 6px; padding: 2px 0; transition: background 0.15s; }
.vc-col-clickable:hover { background: var(--gray-100); }
.vc-col-clickable:hover .vc-bar { filter: brightness(1.15); transform: scaleX(1.15); }
.vc-col-active { background: var(--gray-100); }
.vc-col-active .vc-lbl, .vc-col-active .vc-val { color: var(--primary); }

/* Product section */
.ind-prod-section {
  margin-bottom: 32px;
}
.ind-prod-banner {
  border-radius: var(--radius);
  padding: 24px 28px;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.ind-prod-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ind-prod-banner-left i { font-size: 28px; opacity: 0.8; }
.ind-prod-banner-left h3 { font-size: 20px; font-weight: 700; }
.ind-prod-banner-left span { font-size: 13px; opacity: 0.85; }
.ind-prod-banner-right { text-align: right; }
.ind-prod-big-num { font-size: 36px; font-weight: 800; line-height: 1; }
.ind-prod-big-lbl { font-size: 12px; opacity: 0.8; margin-top: 4px; }

.ind-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ind-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px;
}
.ind-chart-block {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: var(--transition);
}
.ind-chart-block:hover { box-shadow: var(--shadow-hover); }
.ind-chart-auto-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 11px; font-weight: 600; color: var(--gray-500);
  background: var(--gray-100); border-radius: 4px; padding: 2px 8px;
  display: none; gap: 4px; align-items: center;
}
body.edit-mode .ind-chart-block:hover .ind-chart-auto-badge { display: inline-flex; }
.ind-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.ind-chart-title i { margin-right: 6px; }

/* Services modern */
.ind-svc-modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px;
}
.ind-svc-modern {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: var(--transition);
}
.ind-svc-modern:hover { box-shadow: var(--shadow-hover); }
.ind-svc-modern-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.ind-svc-modern-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ind-svc-modern-title { font-size: 14px; font-weight: 700; color: var(--dark-blue); }
.ind-svc-modern-total { font-size: 12px; color: var(--gray-500); }

/* Fechamento modern */
.ind-fech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 18px;
}
.ind-fech-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.ind-fech-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.ind-fech-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--white);
  margin: 0 auto 14px;
}
.ind-fech-value { font-size: 32px; font-weight: 800; color: var(--dark-blue); }
.ind-fech-label { font-size: 12px; color: var(--gray-500); margin-top: 6px; }

/* Dashboard Geral */
.dash-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-welcome h2 { font-size: 24px; color: var(--dark-blue); font-weight: 700; }
.dash-welcome p { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.dash-welcome-date {
  background: var(--surface);
  padding: 10px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--text);
  text-transform: capitalize;
}
.dash-welcome-date i { color: var(--primary); margin-right: 8px; }
.dash-welcome-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-welcome-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-grid-top {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}
.dash-card-big {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}
.dash-card-big:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.dash-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--white); flex-shrink: 0;
}
.dash-card-equipe .dash-card-icon { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.dash-card-ferias .dash-card-icon { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.dash-card-ausencias .dash-card-icon { background: linear-gradient(135deg, #F59E0B, #B45309); }
.dash-card-agendamentos .dash-card-icon { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.dash-card-ferias-hoje .dash-card-icon { background: linear-gradient(135deg, #10B981, #047857); }
.dash-card-compromissos .dash-card-icon { background: linear-gradient(135deg, #6366F1, #4338CA); }
.dash-card-sugestoes .dash-card-icon { background: linear-gradient(135deg, #EC4899, #BE185D); }
.dash-card-number { font-size: 28px; font-weight: 800; color: var(--dark-blue); }
.dash-card-number .dash-card-total { font-size: 18px; font-weight: 500; color: var(--gray-500); }
.dash-card-label { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.dash-card-sub { font-size: 12px; margin-top: 6px; color: var(--text); }
.dash-card-sub i { margin-right: 4px; }

.dash-card-tem-tooltip { cursor: default; }
/* Sem translateY no hover aqui: um transform no ancestor vira containing block
   pra position:fixed dos descendentes, e o tooltip (fixed, calculado em JS
   relativo à viewport) passa a se posicionar relativo ao card em vez da tela
   — jogando ele pra qualquer lugar. */
.dash-card-big.dash-card-tem-tooltip:hover { transform: none; }
.dash-equipe-tooltip {
  display: none;
  position: fixed;
  z-index: 200;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--gray-200, rgba(128,128,128,0.2));
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  padding: 6px 0;
}
.dash-equipe-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 20px;
  border: 6px solid transparent;
  border-bottom-color: var(--surface);
}
.dash-equipe-tooltip-acima::before {
  bottom: auto;
  top: 100%;
  border-bottom-color: transparent;
  border-top-color: var(--surface);
}
.dash-equipe-tooltip-item {
  padding: 6px 14px;
  font-size: 12px;
  line-height: 1.4;
}
.dash-equipe-tooltip-item + .dash-equipe-tooltip-item { border-top: 1px solid var(--gray-200, rgba(128,128,128,0.2)); }
.dash-equipe-tooltip-item strong { display: block; color: var(--text); font-weight: 600; }
.dash-equipe-tooltip-item span { display: block; color: var(--gray-500); margin-top: 1px; }

.dash-card-ausencias { align-items: center; }
.dash-card-ausencias .dash-card-content { flex: 1; min-width: 0; }
.dash-card-number-nome { font-size: 18px; line-height: 1.25; word-break: break-word; }
.dash-card-ausencias-grupo { align-items: flex-start; }
.dash-card-ausencias-grupo .dash-card-content { width: 100%; }
.dash-card-badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 9px; background: var(--gray-200); color: var(--text);
  font-size: 11px; font-weight: 700;
}
.dash-card-agendamentos { align-items: flex-start; }
.dash-card-agendamentos .dash-card-content { width: 100%; }
.dash-card-compromissos { align-items: flex-start; }
.dash-card-compromissos .dash-card-content { width: 100%; }
.dash-card-sugestoes { align-items: flex-start; }
.dash-card-sugestoes .dash-card-content { width: 100%; }
.sug-badge { margin-left: 8px; }
.sug-resposta { display: block; margin-top: 4px; font-style: italic; }
.dash-ausencias-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.dash-ausencia-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px;
  background: var(--gray-50, rgba(148,163,184,.12));
  border-radius: 8px;
}
.dash-ausencia-item-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-ausencia-nome { font-size: 13px; font-weight: 700; color: var(--dark-blue); }
.dash-ausencia-motivo { font-size: 12px; color: var(--text); }
.dash-ausencias-empty { font-size: 12px; color: var(--text); }
.dash-ausencias-empty i { margin-right: 4px; color: var(--success, #10B981); }

/* Seção "Modalidade de trabalho" do dashboard (Coordenador/Diretor) */
.dash-mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
}
.dash-mod-card { flex-direction: column; align-items: stretch; gap: 14px; min-width: 0; }
.dash-mod-card:hover { transform: none; }
.dash-mod-card-titulo { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-500); }
.dash-mod-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.dash-mod-kpi { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; min-width: 0; }
.dash-mod-kpi strong { font-size: 26px; font-weight: 800; line-height: 1; }
.dash-mod-kpi span { font-size: 11px; line-height: 1.25; color: var(--text); }
.dash-mod-kpi-ho { background: #F59E0B22; }
.dash-mod-kpi-ho strong { color: #B45309; }
.dash-mod-kpi-parcial { background: linear-gradient(135deg, #F59E0B22 50%, #DBEAFE88 50%); }
.dash-mod-kpi-parcial strong { color: #B45309; }
.dash-mod-kpi-pres { background: #DBEAFE88; }
.dash-mod-kpi-pres strong { color: #1D4ED8; }
.dash-mod-kpi-visita { background: #D1FAE5; }
.dash-mod-kpi-visita strong { color: #047857; }
.dash-mod-subtitulo { margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--gray-500); }
.dash-mod-lista { display: flex; flex-direction: column; gap: 8px; }
.dash-mod-pessoa {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--gray-50, rgba(148,163,184,.12));
  border-left: 3px solid #F59E0B;
}
.dash-mod-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dash-mod-avatar-ini { display: flex; align-items: center; justify-content: center; color: var(--white); font-weight: 700; font-size: 12px; }
.dash-mod-pessoa-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.dash-mod-nome { font-size: 13px; font-weight: 700; color: var(--dark-blue); }
.dash-mod-cargo { font-size: 11px; color: var(--gray-500); }
.dash-mod-tag { flex-shrink: 0; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; text-align: right; }
.dash-mod-tag-ho { background: #F59E0B; color: var(--white); }
.dash-mod-tag-parcial { background: #F59E0B22; color: #B45309; }
.dash-mod-tag-visita { background: #D1FAE5; color: #047857; }
.dash-mod-agora { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.dash-mod-agora-pres { color: #1D4ED8; }
.dash-mod-vazio { font-size: 12px; color: var(--text); padding: 6px 2px; }
.dash-mod-vazio i { margin-right: 6px; color: var(--gray-500); }
.dash-mod-tabela-wrap { overflow-x: auto; }
.dash-mod-tabela { width: 100%; border-collapse: collapse; font-size: 12px; }
.dash-mod-tabela thead { background: transparent; }
.dash-mod-tabela th { font-size: 11px; font-weight: 700; color: var(--gray-500); text-align: center; padding: 4px 4px 8px; }
.dash-mod-tabela th:first-child { text-align: left; }
.dash-mod-tabela td { padding: 5px 4px; text-align: center; border-top: 1px solid var(--gray-200, rgba(128,128,128,0.2)); }
.dash-mod-col-nome { text-align: left !important; min-width: 130px; }
.dash-mod-col-nome .dash-mod-nome, .dash-mod-col-nome .dash-mod-cargo { display: block; }
.dash-mod-hoje { background: rgba(59,130,246,.10); }
.dash-mod-tabela th.dash-mod-hoje { color: #1D4ED8; background: rgba(59,130,246,.18); border-radius: 6px 6px 0 0; }
.dash-mod-ausente { display: inline-block; margin-top: 2px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #FEE2E2; color: #B91C1C; }
.dash-mod-cel { display: inline-block; min-width: 54px; font-size: 10px; font-weight: 600; line-height: 1.5; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.dash-mod-cel-pres { background: #DBEAFE; color: #1D4ED8; }
.dash-mod-cel-ho { background: #F59E0B; color: var(--white); }
.dash-mod-cel-visita { display: block; margin-top: 3px; background: #D1FAE5; color: #047857; white-space: normal; }
/* Divisão esquerda/direita = manhã/tarde (o texto da célula diz qual lado é home office) */
.dash-mod-cel-ho_manha { background: linear-gradient(to right, #F59E0B 50%, #DBEAFE 50%); color: #431407; }
.dash-mod-cel-ho_tarde { background: linear-gradient(to right, #DBEAFE 50%, #F59E0B 50%); color: #431407; }
@media (max-width: 560px) {
  .dash-mod-resumo { grid-template-columns: 1fr; }
  .dash-mod-cel { min-width: 40px; }
}
.dash-ausencia-encerrar-outro {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: none; border-radius: 6px;
  background: transparent; color: var(--gray-500);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: var(--transition);
}
.dash-ausencia-encerrar-outro:hover { background: #FEF2F2; color: #EF4444; }
.dash-ausencia-item-acoes { flex-shrink: 0; display: flex; gap: 4px; }
.dash-agendamento-acoes { display: none; }
body.edit-mode .dash-agendamento-acoes { display: flex; }
.dash-compromisso-acoes { display: none; }
body.edit-mode .dash-compromisso-acoes { display: flex; }
.dash-agendamento-editar {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: none; border-radius: 6px;
  background: transparent; color: var(--gray-500);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: var(--transition);
}
.dash-agendamento-editar:hover { background: var(--primary-light, #EFF6FF); color: var(--primary); }
.dash-agendamento-cancelar {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: none; border-radius: 6px;
  background: transparent; color: var(--gray-500);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: var(--transition);
}
.dash-agendamento-cancelar:hover { background: #FEF2F2; color: #EF4444; }
.dash-compromisso-editar {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: none; border-radius: 6px;
  background: transparent; color: var(--gray-500);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: var(--transition);
}
.dash-compromisso-editar:hover { background: var(--primary-light, #EFF6FF); color: var(--primary); }
.dash-compromisso-excluir {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: none; border-radius: 6px;
  background: transparent; color: var(--gray-500);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: var(--transition);
}
.dash-compromisso-excluir:hover { background: #FEF2F2; color: #EF4444; }
.dash-ausencia-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap;
  border: none; border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 700;
  background: var(--primary); color: #fff;
  cursor: pointer; transition: var(--transition);
}
.dash-ausencia-btn:hover { filter: brightness(0.92); }
.dash-ausencia-btn-voltar { background: #10B981; }
.dash-ausencia-btn-agendar { background: var(--surface); border: 2px solid var(--gray-200); color: var(--text); }
.dash-ausencia-btn-agendar:hover { background: var(--gray-100); filter: none; }
.dash-colab-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 160px; overflow-y: auto;
  padding: 10px; border: 1px solid var(--gray-200); border-radius: 8px;
}
.dash-colab-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 500; cursor: pointer; user-select: none;
  border: 1.5px solid var(--primary); color: var(--primary); background: transparent; transition: var(--transition);
}
.dash-colab-chip input { display: none; }
.dash-colab-chip:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.dash-colab-chip:has(input:checked) { background: var(--primary); color: #fff; }
.dash-colab-chip:has(input:disabled) { border-color: var(--gray-300); color: var(--gray-400); cursor: not-allowed; }
.dash-colab-chip:has(input:disabled):hover { background: transparent; }
@media (max-width: 600px) {
  .dash-welcome-right { width: 100%; flex-direction: column; align-items: stretch; }
  .dash-welcome-date { text-align: center; }
  .dash-welcome-actions { flex-direction: column; width: 100%; }
  .dash-ausencia-btn { width: 100%; }
}

.dash-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.dash-prod-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.dash-prod-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.dash-prod-header {
  padding: 16px 20px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-prod-header i { font-size: 20px; opacity: 0.9; }
.dash-prod-header h4 { font-size: 15px; font-weight: 700; }
.dash-prod-body { padding: 16px 20px; }
.dash-prod-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
}
.dash-prod-row:last-child { border-bottom: none; }
.dash-prod-row strong { color: var(--dark-blue); font-size: 15px; }

/* Mapa da Infraestrutura */
.mapa-header {
  text-align: center;
  margin-bottom: 28px;
}
.mapa-header h2 { font-size: 24px; color: var(--dark-blue); }
.mapa-header h2 i { margin-right: 8px; }
.mapa-header p { color: var(--gray-500); font-size: 14px; margin-top: 4px; }

.mapa-top-nodes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 0;
}
.mapa-top-node {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid var(--gray-200);
  transition: var(--transition);
}
.mapa-top-node:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.mapa-top-fw { border-color: #EF4444; }
.mapa-top-ad { border-color: #8B5CF6; }
.mapa-top-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--white);
}
.mapa-top-fw .mapa-top-icon { background: #EF4444; }
.mapa-top-ad .mapa-top-icon { background: #8B5CF6; }
.mapa-top-name { font-size: 16px; font-weight: 700; color: var(--dark-blue); }
.mapa-top-detail { font-size: 12px; color: var(--gray-500); }
.mapa-top-ip { font-size: 11px; color: var(--gray-500); font-family: monospace; margin-top: 2px; }
.mapa-top-connector {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #EF4444, #8B5CF6);
  border-radius: 2px;
}

.mapa-main-connector {
  display: flex;
  justify-content: center;
  padding: 0;
  height: 40px;
}
.mapa-main-line {
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #8B5CF6, var(--gray-300));
  border-radius: 2px;
}

.mapa-envs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.mapa-env {
  background: var(--env-bg);
  border: 2px solid var(--env-color);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
}
.mapa-env:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.mapa-env-header {
  background: var(--env-color);
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mapa-env-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.mapa-env-meta { font-size: 12px; opacity: 0.85; }
.mapa-env-body { padding: 20px; }

.mapa-db-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mapa-node {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}
.mapa-node:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-1px); }
.mapa-node-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--white);
  flex-shrink: 0;
}
.mapa-node-db .mapa-node-icon { background: #F59E0B; }
.mapa-node-app .mapa-node-icon { background: var(--env-color); }
.mapa-node-name { font-size: 14px; font-weight: 700; color: var(--dark-blue); }
.mapa-alias { font-size: 11px; background: var(--env-color); color: var(--white); padding: 1px 8px; border-radius: 8px; font-weight: 600; }
.mapa-node-detail { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.mapa-node-ip { font-size: 11px; color: var(--gray-500); font-family: 'Consolas', monospace; margin-top: 2px; }
.mapa-node-dns { font-size: 10px; color: var(--env-color, var(--primary)); font-weight: 600; margin-top: 3px; }
.mapa-node-users { font-size: 11px; color: var(--env-color); font-weight: 600; margin-top: 4px; }
.mapa-node-users i { margin-right: 4px; }

.mapa-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  position: relative;
}
.mapa-line-v {
  width: 3px;
  height: 16px;
  background: var(--env-color);
  border-radius: 2px;
  opacity: 0.4;
}
.mapa-line-h {
  height: 3px;
  width: 80%;
  background: var(--env-color);
  border-radius: 2px;
  opacity: 0.4;
}
.mapa-line-v-down {
  display: none;
}

.mapa-app-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 14px;
}

.mapa-app-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mapa-dns-tag {
  font-size: 11px;
  color: var(--env-color);
  font-weight: 600;
  text-align: center;
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 6px;
  border: 1px dashed var(--env-color);
}
.mapa-dns-tag i { margin-right: 4px; opacity: 0.6; }

.mapa-clients-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mapa-client {
  font-size: 11px;
  padding: 5px 10px;
  background: var(--surface);
  border-radius: 6px;
  color: var(--text);
  border-left: 3px solid var(--env-color);
  transition: var(--transition);
}
.mapa-client:hover { background: var(--env-bg); transform: translateX(3px); }
.mapa-client i { color: var(--env-color); margin-right: 6px; font-size: 10px; }
.mapa-client-users { float: right; font-size: 10px; font-weight: 600; color: var(--env-color); opacity: 0.85; }

.mapa-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.mapa-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.mapa-legend-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 13px;
}

/* Cadastro de Colaboradores */
.cad-top-bar { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.cad-summary { display: flex; gap: 16px; flex-wrap: wrap; }
.cad-sum-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 24px; text-align: center; min-width: 120px; }
.cad-sum-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 16px; margin: 0 auto 8px; }
.cad-sum-num { font-size: 24px; font-weight: 700; color: var(--text); }
.cad-sum-lbl { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

.cad-filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cad-search { position: relative; flex: 1; min-width: 200px; }
.cad-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-500); font-size: 14px; }
.cad-search input { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 14px; background: var(--surface); }
.cad-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
.cad-select { padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 14px; background: var(--surface); cursor: pointer; }
.cad-select:focus { outline: none; border-color: var(--primary); }

.cad-table-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.cad-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cad-table thead { background: var(--gray-100); }
.cad-table th { padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text); white-space: nowrap; border-bottom: 2px solid var(--gray-200); }
.cad-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.cad-table tbody tr:hover { background: var(--gray-100); }
.cad-table tbody tr:last-child td { border-bottom: none; }
.cad-th-actions { text-align: center; width: 100px; }
.cad-td-actions { text-align: center; white-space: nowrap; }

.cad-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.cad-pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

.aud-stats-grid { margin-bottom: 20px; }
.aud-stat-success { border-left-color: var(--success); }
.aud-stat-success .stat-icon { color: var(--success); }
.aud-stat-danger { border-left-color: var(--danger); }
.aud-stat-danger .stat-icon { color: var(--danger); }
.aud-stat-warning { border-left-color: var(--warning); }
.aud-stat-warning .stat-icon { color: var(--warning); }

.aud-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.aud-badge-success { background: #D1FAE5; color: #065F46; }
.aud-badge-danger { background: #FEE2E2; color: #991B1B; }
.aud-badge-warning { background: #FEF3C7; color: #92400E; }
.aud-badge-primary { background: var(--light-blue); color: var(--primary); }
.acr-badge-critical { background: #7F1D1D; color: #FECACA; }

.aud-row-today { background: #F0F9FF; }
.aud-row-today:hover { background: #E0F2FE !important; }
.aud-today-chip { display: inline-block; background: var(--primary); color: var(--white); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; margin-right: 6px; letter-spacing: .3px; }

.cad-cell-nome { display: flex; align-items: center; gap: 10px; }
.cad-row-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cad-row-avatar-init { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.cad-cell-nome span { font-weight: 500; }

.cad-cargo-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }

.cad-posto-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; margin: 2px 4px 2px 0; }

.cad-posto-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.cad-posto-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; user-select: none; border: 1.5px solid var(--pc); color: var(--pc); background: transparent; transition: var(--transition); }
.cad-posto-chip input { display: none; }
.cad-posto-chip:hover { background: color-mix(in srgb, var(--pc) 12%, transparent); }
.cad-posto-chip:has(input:checked) { background: var(--pc); color: var(--white); }

.cad-mod-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.cad-mod-presencial { color: #1D4ED8; background: #1D4ED818; }
.cad-mod-hibrido { color: #B45309; background: #F59E0B22; }
.cad-dias { display: flex; gap: 3px; margin-top: 4px; }
.cad-dia { font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.cad-dia-pres { background: #DBEAFE; color: #1D4ED8; }
.cad-dia-ho { background: #F59E0B; color: var(--white); }
.cad-dia-ho_manha { background: linear-gradient(to bottom, #F59E0B 50%, #DBEAFE 50%); color: #7C2D12; }
.cad-dia-ho_tarde { background: linear-gradient(to bottom, #DBEAFE 50%, #F59E0B 50%); color: #7C2D12; }
.cad-mod-homeoffice { color: #B45309; background: #F59E0B22; }
.cad-mod-obs { display: block; margin-top: 4px; font-size: 11px; color: var(--text-light, #6B7280); }
.cad-escala-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cad-escala-dia { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.cad-escala-dia select { width: 100%; font-size: 11px; padding: 4px; }
.cad-visita-chip { display: block; margin-top: 4px; width: fit-content; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: #D1FAE5; color: #047857; }
.cad-visita-row { display: grid; grid-template-columns: 1.4fr 1fr 70px 1fr 28px; gap: 6px; margin-bottom: 6px; }
.cad-visita-row input, .cad-visita-row select { min-width: 0; font-size: 12px; padding: 5px; }
.cad-visita-del, .cad-visita-add { cursor: pointer; border: 1px solid var(--gray-200, rgba(128,128,128,.3)); background: transparent; border-radius: 6px; color: var(--text); }
.cad-visita-add { font-size: 12px; padding: 5px 10px; }
.eq-modalidade { margin-top: 4px; }
.eq-modalidade .cad-mod-badge { font-size: 11px; padding: 2px 8px; }

.cad-status { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.cad-status-ativo { background: #D1FAE5; color: #065F46; }
.cad-status-ferias { background: #FEF3C7; color: #92400E; }
.cad-status-inativo { background: #FEE2E2; color: #991B1B; }

.usr-online-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.usr-online-on { background: #22C55E; box-shadow: 0 0 0 3px #DCFCE7; }
.usr-online-off { background: #CBD5E1; }
.usr-online-ip { font-size: 12px; color: var(--gray-500); }

.cad-act-btn { width: 32px; height: 32px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; transition: var(--transition); background: transparent; color: var(--gray-500); }
.cad-act-btn:hover { background: var(--gray-200); color: var(--text); }
.cad-act-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.cad-act-btn:disabled:hover { background: transparent; color: var(--gray-500); }
.cad-del-btn:hover { background: #FEE2E2; color: var(--danger); }

.cad-modal-lg { max-width: 700px; width: 95%; }
.cad-form-grid { display: flex; gap: 24px; padding: 0 0 8px; }
.cad-form-fields { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.cad-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 600px) {
  .cad-form-grid { flex-direction: column; align-items: center; }
  .cad-form-row { grid-template-columns: 1fr; }
}

/* Responsive */
/* Botão hambúrguer e backdrop do drawer: escondidos no desktop, ativados no mobile. */
.menu-btn {
  display: none;
  width: 40px; height: 40px;
  border: none; border-radius: 8px;
  background: var(--gray-100); color: var(--dark-blue);
  font-size: 18px; cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}

@media (max-width: 768px) {
  /* Sidebar vira drawer off-canvas: some por padrão e desliza por cima com .open */
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.25); }
  .sidebar.collapsed { width: 260px; }
  .sidebar.collapsed .logo-text, .sidebar.collapsed .nav-label, .sidebar.collapsed .sidebar-footer,
  .sidebar.collapsed .nav-group-toggle .nav-label, .sidebar.collapsed .nav-group-toggle .nav-arrow { display: block; }
  .sidebar.collapsed .nav-item { justify-content: flex-start; padding: 12px 20px; }
  .sidebar.collapsed .nav-group-toggle { justify-content: flex-start; padding: 12px 20px; }
  .sidebar.collapsed .nav-item.sub { padding-left: 40px; justify-content: flex-start; }
  .sidebar.collapsed .logo { padding: 0 20px; justify-content: flex-start; }
  .sidebar.collapsed .logo .logo-img { height: 36px; width: auto; }
  .main { margin-left: 0; }
  .sidebar.collapsed ~ .main { margin-left: 0; }
  .toggle-btn { display: none; }
  .menu-btn { display: flex; }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .content { padding: 12px; }
  .header { padding: 12px; height: auto; gap: 10px; }
  .header h1 { font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-right { gap: 10px; }
  .header-info { display: none; }
  #edit-mode-label { display: none; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 12px; }
}

@media (max-width: 600px) {
  /* Modais: botões empilhados em largura total, sempre alcançáveis */
  .eq-form-actions { flex-direction: column-reverse; padding: 12px 16px 16px; }
  .eq-form-actions button { width: 100%; justify-content: center; }
  .eq-modal-header { padding: 14px 16px; }
  .eq-form-fields, .eq-modal-body { padding: 12px 16px; }
  .eq-confirm-text { padding: 12px 16px; }
  /* Tabelas: células mais compactas (wrappers já têm overflow-x: auto) */
  .cad-table th, .cad-table td, .table-wrap th, .table-wrap td { padding: 8px 10px; }
  /* Login mais confortável em telas estreitas */
  .login-card { padding: 24px 20px; }
  .login-panel { align-items: flex-start; }
}

/* ===================
   DEVOPS MODULE
   =================== */

/* Hero */
.dv-hero {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.dv-hero h2 { font-size: 22px; color: var(--dark); margin: 0; }
.dv-hero p { color: var(--gray-500); margin: 4px 0 0; font-size: 14px; }
.dv-add-btn { display: none !important; }
body.edit-mode .dv-add-btn { display: inline-flex !important; }

/* Project Grid */
.dv-proj-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px;
}
.dv-proj-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
}
.dv-proj-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.dv-proj-card.dragging { opacity: 0.4; }
/* Modo Edição: card continua clicável; só a alça arrasta. Sem translateY no hover
   (o card se movia sob o cursor e o clique nas bordas se perdia). */
body.edit-mode .dv-proj-card:hover { transform: none; }
.dv-proj-grip { display: none; cursor: grab; padding: 2px 4px; margin-left: -4px; opacity: .8; flex-shrink: 0; }
.dv-proj-grip:hover { opacity: 1; }
body.edit-mode .dv-proj-grip { display: inline-flex; }
body.edit-mode .dv-proj-card.dragging .dv-proj-grip { cursor: grabbing; }
.dv-proj-card-loading { opacity: .6; pointer-events: none; cursor: progress; }
.dv-proj-card-header {
  padding: 16px 20px; color: white; display: flex; flex-direction: column; gap: 8px;
}
.dv-proj-card-header-top { display: flex; align-items: center; gap: 10px; }
.dv-proj-card-header i { font-size: 18px; flex-shrink: 0; }
.dv-proj-card-header h4 {
  margin: 0; font-size: 16px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dv-proj-actions { display: none; gap: 4px; flex-shrink: 0; justify-content: flex-end; }
body.edit-mode .dv-proj-actions { display: flex; }
.dv-proj-card-archived { opacity: .55; }
.dv-proj-archived-badge {
  font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.25);
  padding: 2px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0;
}
.dv-proj-card-body { padding: 14px 20px; }
.dv-proj-card-body p { margin: 0; font-size: 13px; color: var(--gray-500); white-space: pre-wrap; }
.dv-proj-doing {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-top: 1px solid var(--gray-200);
  font-size: 12px; font-weight: 600; color: var(--gray-600);
}
.dv-proj-doing-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #10B981;
  flex-shrink: 0; animation: dvDoingPulse 1.8s ease-in-out infinite;
}
@keyframes dvDoingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  50%      { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}
.dv-proj-doing-avatars { display: flex; margin-left: auto; }
.dv-proj-doing-avatar {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--surface); margin-left: -6px; flex-shrink: 0;
}
.dv-proj-doing-avatar:first-child { margin-left: 0; }
.dv-proj-doing-avatar-txt {
  background: var(--gray-300); color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
}
.dv-empty { text-align: center; padding: 60px 20px; color: var(--gray-400); }
.dv-empty i { font-size: 48px; margin-bottom: 12px; }
.dv-empty p { font-size: 15px; }

/* Board Header */
.dv-board-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.dv-board-back { display: flex; align-items: center; gap: 12px; }
.dv-back-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--gray-300);
  background: var(--surface); cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 14px; color: var(--gray-600); transition: var(--transition);
}
.dv-back-btn:hover { background: var(--gray-100); color: var(--primary); }
.dv-view-btn {
  background: var(--surface); color: var(--gray-700); border: 1px solid var(--gray-300);
  padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: var(--transition); white-space: nowrap;
}
.dv-view-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--gray-100); }
.dv-board-title { display: flex; align-items: center; gap: 10px; }
.dv-board-title i { font-size: 20px; }
.dv-board-title h2 { margin: 0; font-size: 20px; }

/* Indicators */
.dv-indicators-row { display: flex; align-items: stretch; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.dv-indicators-row .dv-indicators {
  display: flex; flex-wrap: wrap; flex: 0 1 auto; margin-bottom: 0;
}
.dv-indicators-row .dv-indicators .dv-ind-card { flex: 0 1 180px; }
.dv-ind-refresh-btn {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 48px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: none; cursor: pointer; color: var(--gray-500); font-size: 16px; transition: var(--transition);
}
.dv-ind-refresh-btn:hover { color: var(--primary); }
.dv-ind-refresh-btn:disabled { opacity: 0.6; cursor: default; }
.dv-indicators {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px;
  margin-bottom: 20px;
}
.dv-ind-card {
  background: var(--surface); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px;
}
.dv-ind-icon {
  width: 40px; height: 40px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.dv-ind-value { font-size: 22px; font-weight: 700; color: var(--dark); line-height: 1; }
.dv-ind-label { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.dv-ind-clickable { cursor: pointer; transition: var(--transition); }
.dv-ind-clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Global dashboard — modal de tarefas por KPI */
.dv-glist-proj {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 6px;
  font-weight: 600; font-size: 13px; color: var(--dark);
}
.dv-glist-proj:first-child { margin-top: 0; }
.dv-glist-resp { display: flex; align-items: center; justify-content: flex-end; width: 28px; flex-shrink: 0; color: var(--gray-400); }
.dv-hist-task-proj {
  font-size: 10px; font-weight: 600; color: #fff; padding: 2px 8px; border-radius: 10px;
  flex-shrink: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Kanban */
.dv-kanban-container {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px;
  min-height: 400px; align-items: stretch;
}
.dv-kanban-col {
  min-width: 280px; flex: 0 0 280px; background: var(--gray-100);
  border-radius: var(--radius); display: flex; flex-direction: column;
}
.dv-col-header {
  padding: 12px 14px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--gray-200);
}
.dv-col-title { display: flex; align-items: center; gap: 8px; }
.dv-col-title span:first-child { font-weight: 600; font-size: 14px; color: var(--dark); }
.dv-col-count {
  background: var(--gray-300); color: var(--gray-600); font-size: 11px;
  padding: 1px 7px; border-radius: 10px; font-weight: 600;
}
.dv-col-add-task {
  width: 30px !important; height: 30px; border-radius: 50% !important; border: 2px dashed var(--gray-300) !important;
  background: transparent !important; cursor: pointer; font-size: 13px !important;
  color: var(--gray-400) !important; padding: 0 !important; justify-content: center;
  transition: all 0.25s ease !important;
}
.dv-col-add-task:hover {
  background: var(--primary) !important; color: white !important;
  border: 2px solid var(--primary) !important; transform: rotate(90deg);
  box-shadow: 0 2px 8px rgba(0,102,204,0.3);
}
.dv-col-body {
  padding: 8px; flex: 1; min-height: 200px; display: flex; flex-direction: column; gap: 8px;
  transition: background 0.2s;
}
.dv-col-empty {
  text-align: center; padding: 20px 10px; color: var(--gray-400); font-size: 12px;
  font-style: italic;
}
.dv-drag-over {
  background: rgba(59,130,246,0.08); border: 2px dashed var(--primary);
  border-radius: 0 0 var(--radius) var(--radius);
}
.dv-col-archived-link {
  text-align: center; padding: 8px 6px; margin-top: 2px; font-size: 11px;
  color: var(--gray-500); cursor: pointer; border-top: 1px dashed var(--gray-300);
}
.dv-col-archived-link:hover { color: var(--primary); text-decoration: underline; }

/* Task Cards */
.dv-task-card {
  background: var(--surface); border-radius: 8px; padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08); cursor: pointer; transition: var(--transition);
  border-left: 4px solid var(--gray-300); position: relative;
}
.dv-task-card:hover { box-shadow: 0 3px 8px rgba(0,0,0,0.12); transform: translateY(-1px); }
.dv-task-card.dragging { opacity: 0.4; transform: rotate(2deg); }
.dv-task-card.dv-just-dropped { animation: dv-drop-pop 0.35s ease; }
@keyframes dv-drop-pop {
  0% { transform: scale(0.95); box-shadow: 0 0 0 2px var(--primary); }
  100% { transform: scale(1); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
}
.dv-task-title { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 8px; line-height: 1.3; }
.dv-task-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.dv-task-resp { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gray-500); }
.dv-task-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.dv-task-avatar-txt {
  width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700;
}
.dv-task-time { font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 3px; }
.dv-time-running { color: #10B981; font-weight: 600; }
.dv-task-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--gray-400);
}
.dv-task-priority { display: flex; align-items: center; gap: 3px; font-weight: 600; }
.dv-task-date { font-size: 10px; }

/* Task Form */
.dv-form-row { display: flex; gap: 14px; }
#dv-task-f-desc {
  width: 100%; padding: 10px 14px; border: 2px solid var(--gray-200); border-radius: 8px;
  font-size: 14px; font-family: inherit; resize: vertical; min-height: 110px;
  color: var(--text); background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
#dv-task-f-desc:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }

/* Status Select */
.dv-status-select {
  padding: 6px 12px; border: 2px solid var(--primary); border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--primary); background: rgba(0,102,204,0.05);
  cursor: pointer; transition: all 0.2s;
}
.dv-status-select:hover { background: rgba(0,102,204,0.1); }
.dv-status-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,102,204,0.15); }

/* Detail Modal */
.dv-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.dv-detail-item { display: flex; flex-direction: column; gap: 2px; }
.dv-detail-label { font-size: 11px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; }
.dv-detail-value { font-size: 14px; color: var(--dark); }

/* Comments */
.dv-comment {
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.dv-comment:last-child { border-bottom: none; }
.dv-comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dv-comment-header strong { font-size: 13px; color: var(--dark); }
.dv-comment-date { font-size: 11px; color: var(--gray-400); margin-left: auto; }
.dv-comment-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dv-comment-avatar-txt {
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700;
}
.dv-comment-text { font-size: 13px; color: var(--gray-700); padding-left: 32px; white-space: pre-wrap; }
.dv-comment-edit, .dv-comment-del {
  width: 22px; height: 22px; padding: 0; border: none; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  transition: var(--transition); flex-shrink: 0;
}
.dv-comment-edit { background: #EFF6FF; color: #3B82F6; }
.dv-comment-edit:hover { background: #3B82F6; color: var(--white); }
.dv-comment-del { background: #FEF2F2; color: #EF4444; }
.dv-comment-del:hover { background: #EF4444; color: var(--white); }

/* Column Config */
.dv-col-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--gray-100); cursor: grab;
}
.dv-col-item.dragging { opacity: 0.4; }
.dv-col-drag-handle { color: var(--gray-400); cursor: grab; }
.dv-col-tipo-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: var(--gray-200); color: var(--gray-600); font-weight: 600;
}

/* History Modal */
.dv-hist-month { border-bottom: 1px solid var(--gray-100); }
.dv-hist-month:last-child { border-bottom: none; }
.dv-hist-month-header {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 4px;
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--dark);
}
.dv-hist-month-header:hover { color: var(--primary); }
.dv-hist-chevron { transition: transform 0.2s ease; margin-right: 6px; font-size: 11px; color: var(--gray-400); display: inline-block; }
.dv-hist-month-body { padding: 0 4px 10px 18px; display: flex; flex-direction: column; gap: 6px; }
.dv-hist-task {
  display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--gray-600);
  padding: 6px 10px; background: var(--gray-100); border-radius: 6px; cursor: pointer;
}
.dv-hist-task:hover { background: var(--gray-200); }
.dv-hist-task-title { flex: 1; font-weight: 600; color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-hist-task-resp { width: 90px; text-align: right; flex-shrink: 0; }
.dv-hist-task-date { width: 70px; text-align: right; flex-shrink: 0; }
.dv-hist-task-time { width: 55px; text-align: right; flex-shrink: 0; color: var(--gray-500); }

/* Stats Modal */
.dv-stats-total { font-size: 12px; color: var(--gray-500); margin-bottom: 12px; }

/* Members Selection */
.dv-members-list {
  max-height: 200px; overflow-y: auto; border: 2px solid var(--gray-200);
  border-radius: 8px; padding: 8px;
}
.dv-member-check {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 6px; cursor: pointer; font-size: 13px; transition: background 0.15s;
}
.dv-member-check:hover { background: var(--gray-100); }
.dv-member-check input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.dv-member-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dv-member-avatar-txt {
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0;
}

/* ===== Serviços Dashboard ===== */
.svc-loading, .svc-error { text-align: center; padding: 60px 20px; color: var(--gray-500); font-size: 16px; }
.svc-error h2 { margin-bottom: 8px; color: var(--text); }
.svc-error p { margin: 4px 0; }
.svc-error code { background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.svc-error ol { font-size: 14px; line-height: 1.8; }

.svc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.svc-tab-badge { background: rgba(255,255,255,.25); padding: 1px 7px; border-radius: 10px; font-size: 11px; margin-left: 4px; font-weight: 700; }
.ind-tab.active .svc-tab-badge { background: rgba(0,0,0,.1); }

.svc-stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.svc-stat-row .ms-card { flex: 1; min-width: 160px; }

.svc-charts-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.svc-chart-box { flex: 1; min-width: 300px; background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.svc-chart-box h3 { font-size: 14px; font-weight: 600; margin: 0 0 14px 0; color: var(--text); }

.svc-section-title { font-size: 15px; font-weight: 600; margin: 24px 0 12px; color: var(--text); }
.svc-search-count { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; }

.svc-hbar-list { display: flex; flex-direction: column; gap: 8px; }
.svc-hbar-row { display: flex; align-items: center; gap: 10px; }
.svc-hbar-label { width: 110px; font-size: 13px; font-weight: 500; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-hbar-track { flex: 1; height: 22px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.svc-hbar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.svc-hbar-val { width: 36px; font-size: 13px; font-weight: 700; color: var(--text); }

.svc-table-wrap { max-height: 400px; overflow-y: auto; overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.svc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.svc-table thead { position: sticky; top: 0; z-index: 1; }
.svc-table th { background: var(--primary); color: white; padding: 10px 12px; text-align: left; font-weight: 600; white-space: nowrap; }
.svc-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-200); }
.svc-table tbody tr:hover { background: var(--light-blue); }
.svc-table .row-overdue { background: #FEE2E2; }

/* Modal de detalhes de atendimentos (Indicadores Produtos/Serviços): tabela
   larga com muitas colunas - usa table-layout fixo pra distribuir as colunas
   dentro da modal em vez de estourar largura e gerar rolagem lateral. */
.ips-detalhes-body .svc-table-wrap { max-height: 65vh; }
.ips-detalhes-body .svc-table { table-layout: fixed; }
.ips-detalhes-body .svc-table th,
.ips-detalhes-body .svc-table td { overflow-wrap: break-word; white-space: normal; }
.svc-table .row-overdue:hover { background: #FECACA; }

.svc-year-selector { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.svc-year-btn, .svc-month-btn, .svc-view-btn { padding: 4px 12px; border: 1px solid var(--gray-300); border-radius: 16px; background: var(--surface); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; color: var(--text); }
.svc-year-btn:hover, .svc-month-btn:hover, .svc-view-btn:hover { border-color: var(--primary); color: var(--primary); }
.svc-year-btn.active, .svc-month-btn.active, .svc-view-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.svc-cross-box { flex: none; width: 100%; margin-bottom: 24px; }
.svc-cross-ranking { margin-top: 4px; }
.svc-cross-table th, .svc-cross-table td { text-align: center; }
.svc-cross-table th:first-child, .svc-cross-table td:first-child {
  text-align: left; position: sticky; left: 0; z-index: 2;
}
.svc-cross-table tbody td:first-child { background: var(--surface); }
.svc-cross-table thead th:first-child { background: var(--primary); z-index: 3; }
.svc-cross-zero { color: var(--gray-400); }
.svc-cross-total { font-weight: 700; }
.svc-cross-table tfoot td { font-weight: 700; border-top: 2px solid var(--gray-300); background: var(--gray-50); }
.svc-cross-table tfoot td:first-child { background: var(--gray-50); }

/* Custo Ambientes */
.svc-tabs-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.svc-tabs-header .svc-tabs { margin-bottom: 0; }
.custos-chip {
  display: inline-block; padding: 2px 8px; margin: 2px 3px 2px 0;
  border-radius: 10px; font-size: 11px; font-weight: 600;
  background: var(--light-blue); color: var(--primary);
}
.custos-total-row { font-weight: 700; background: var(--gray-100); }
.custos-total-row td { border-top: 2px solid var(--dark-blue); }
.custos-obs { font-size: 12px; color: var(--gray-500); margin-top: 8px; font-style: italic; }
.custos-negativo { color: var(--danger); font-weight: 600; }
.custos-link-infra {
  display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 20px;
  font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 600;
}
.custos-link-infra:hover { text-decoration: underline; }
.custos-refresh-btn {
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--gray-300);
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
}
.custos-refresh-btn:hover { border-color: var(--primary); color: var(--primary); }
.custos-retry-btn {
  margin-top: 16px; padding: 8px 20px; border-radius: 8px; border: none;
  background: var(--primary); color: white; font-weight: 600; cursor: pointer;
}

/* Backup Acronis - cards por dispositivo */
.acr-device-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 16px;
}
.acr-device-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
  overflow: hidden;
}
.acr-device-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.acr-device-head i { font-size: 20px; color: var(--primary); }
.acr-device-name { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow-wrap: break-word; }
.acr-device-head .aud-badge { flex-shrink: 0; }
.acr-device-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--gray-500); padding: 5px 0; border-bottom: 1px solid var(--gray-200);
}
.acr-device-row:last-of-type { border-bottom: none; }
.acr-device-row strong { color: var(--text); font-weight: 600; }
.acr-history-toggle, .acr-debug-toggle {
  background: none; border: none; color: var(--primary); font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 8px 0 0; display: block;
}
.acr-history-list { margin-top: 6px; font-size: 12px; }
.acr-history-item { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.acr-history-error { font-size: 11px; color: var(--danger); padding: 0 0 4px; }
.acr-device-error {
  font-size: 12px; color: var(--danger); padding: 2px 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.acr-device-error-link {
  font-size: 11px; color: var(--primary); text-decoration: none; font-weight: 600; margin-left: auto; white-space: nowrap;
}
.acr-device-error-link:hover { text-decoration: underline; }
.acr-debug-pre {
  background: var(--gray-100); border-radius: 6px; padding: 8px; font-size: 11px;
  max-height: 220px; overflow: auto; margin-top: 8px; white-space: pre-wrap; word-break: break-all;
}

/* Login */
.login-screen {
  width: 100%; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: stretch; justify-content: center;
  background: var(--gray-100);
}
.login-illustration {
  flex: 1;
  position: relative;
  background: url('../img/login-background.png') left center/cover no-repeat;
  overflow: hidden;
}
.login-panel {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.login-card {
  width: 100%; max-width: 380px; padding: 36px 40px;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-hover);
}
.login-card .logo { padding: 0 0 8px; height: auto; border-bottom: none; justify-content: center; }
.login-card .logo-text small { color: var(--text); }
.login-card .logo-img { height: 48px; }
.login-subtitle { text-align: center; font-size: 13px; color: var(--gray-500); margin-bottom: 20px; }
.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-form label { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 10px; }
.login-input-group { position: relative; display: flex; align-items: center; }
.login-input-group i {
  position: absolute; left: 12px; color: var(--gray-500); font-size: 14px; pointer-events: none;
}
.login-form input {
  width: 100%; padding: 11px 12px 11px 36px; border: 1px solid transparent; border-radius: 10px;
  background: var(--gray-100); font-size: 14px; color: var(--text); transition: var(--transition);
}
.login-form input:focus { outline: none; background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
.login-form input:disabled { opacity: 0.6; cursor: not-allowed; }
.login-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 6px; }
.login-btn {
  margin-top: 12px; padding: 12px; border: none; border-radius: 10px;
  background: var(--primary); color: white; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: var(--transition);
}
.login-btn:hover { background: var(--dark-blue); }
.login-btn:disabled { background: var(--gray-500); cursor: not-allowed; }
.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 400; color: var(--gray-500);
  margin-top: 10px; cursor: pointer;
}
.login-remember input { width: auto; }

@media (max-width: 900px) {
  .login-illustration { display: none; }
  .login-panel { padding: 24px 16px; }
}

/* Segurança / MFA */
.sec-card {
  max-width: 480px; padding: 24px; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px;
}
.sec-card h3 { color: var(--dark-blue); margin-bottom: 6px; }
.sec-hint { font-size: 13px; color: var(--gray-500); margin-bottom: 16px; }
.sec-empty { font-size: 14px; color: var(--text); margin-bottom: 12px; }
.sec-enroll-btn { width: auto; padding: 10px 20px; }
.sec-factor {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; border: 1px solid var(--gray-200); border-radius: 8px; margin-bottom: 8px;
  font-size: 14px;
}
.sec-remove-btn {
  border: none; background: none; color: var(--danger); cursor: pointer; padding: 6px;
}
.sec-enroll-box { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.sec-enroll-box label { font-size: 13px; font-weight: 600; margin-top: 8px; }
.sec-enroll-box input {
  padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 14px;
}
.sec-enroll-step {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text); line-height: 1.5; text-align: left;
}
.sec-step-num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.sec-qr-frame {
  align-self: center;
  padding: 10px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 12px;
  line-height: 0;
}
.sec-qr { width: 180px; height: 180px; max-width: 100%; display: block; }
.sec-secret-row { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.sec-secret-label { font-size: 12px; color: var(--gray-500); }
.sec-secret-box {
  display: flex; align-items: center; gap: 6px;
  background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 8px;
  padding: 6px 8px 6px 12px; max-width: 100%;
}
.sec-secret-box code {
  font-size: 12px; color: var(--text); word-break: break-all; text-align: left;
}
.sec-copy-btn {
  flex-shrink: 0; width: 28px; height: 28px;
  border: none; border-radius: 6px; background: var(--surface);
  color: var(--gray-500); cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.sec-copy-btn:hover { color: var(--primary); }
/* input.sec-code-input: mesma especificidade de ".sec-enroll-box input" e definido depois,
   pra vencer o estilo genérico dos inputs do box (usado também no form de trocar senha). */
input.sec-code-input {
  padding: 12px; border: 1px solid var(--gray-300); border-radius: 10px;
  font-size: 20px; letter-spacing: 8px; text-align: center; font-weight: 600;
  width: 100%;
}
input.sec-code-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }

/* Usuários - matriz de permissões */
.usr-perms-matrix {
  max-height: 50vh; overflow-y: auto; margin: 12px 0;
  border: 1px solid var(--gray-200); border-radius: 10px;
  transition: opacity 0.2s ease;
}
.usr-perms-matrix.is-disabled { opacity: 0.45; pointer-events: none; }
.usr-perms-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px 6px; background: var(--gray-50, #F9FAFB);
}
.usr-perms-group + .usr-perms-group .usr-perms-group-head,
.usr-perms-group:first-child .usr-perms-group-head { border-top: 1px solid var(--gray-100); }
.usr-perms-group:first-child .usr-perms-group-head { border-top: none; }
.usr-perms-group-title {
  font-size: 12px; font-weight: 700; color: var(--gray-500); text-transform: uppercase;
  letter-spacing: 0.5px;
}
.usr-perms-group-all { display: flex; gap: 4px; }
.usr-perms-group-all button {
  border: 1px solid var(--gray-200); background: var(--surface); color: var(--gray-500);
  font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px;
  cursor: pointer; transition: var(--transition);
}
.usr-perms-group-all button:hover { border-color: var(--primary); color: var(--primary); }
.usr-perms-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px; border-top: 1px solid var(--gray-100); font-size: 14px;
}
.usr-perms-group .usr-perms-row:first-of-type { border-top: none; }
.usr-perms-label { flex: 1; }
.usr-perms-options {
  display: flex; gap: 2px; background: var(--gray-100); border-radius: 8px; padding: 2px;
  font-size: 12px; white-space: nowrap;
}
.usr-perms-options label {
  display: flex; align-items: center; padding: 5px 10px; border-radius: 6px;
  cursor: pointer; font-weight: 600; color: var(--gray-500); transition: var(--transition);
}
.usr-perms-options input { display: none; }
.usr-perms-options label:has(input[value="edit"]:checked) { background: #D1FAE5; color: #065F46; }
.usr-perms-options label:has(input[value="view"]:checked) { background: #DBEAFE; color: #1E40AF; }
.usr-perms-options label:has(input[value="none"]:checked) { background: var(--surface); color: var(--gray-500); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.usr-perms-admin-note {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: #1E40AF;
  background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 8px; padding: 8px 12px; margin: 0 0 10px;
}

.eq-modal-body { padding: 16px 24px; }

.isk-alert-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.isk-alert-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 8px; background: var(--gray-100);
}
.isk-alert-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.isk-alert-item-nome { font-weight: 600; color: var(--dark-blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.isk-alert-item-data { font-size: 12px; color: var(--gray-500); }
.isk-alert-empty { color: var(--gray-500); text-align: center; padding: 12px 0; }

.usr-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; margin: 4px 0 14px;
  border: 2px solid var(--gray-200); border-radius: 10px;
  cursor: pointer; transition: var(--transition);
}
.usr-toggle-row:hover { border-color: var(--gray-300); }
.usr-toggle-row strong { display: block; font-size: 14px; color: var(--text); }
.usr-toggle-row span { display: block; font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.usr-toggle-row input { width: auto; flex-shrink: 0; }

/* Infra Interna Sky */
.isk-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.isk-toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.isk-toolbar h3 { margin: 0; font-size: 16px; color: var(--dark-blue); }
.isk-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.isk-search-wrap { position: relative; }
.isk-search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-500); font-size: 13px; }
.isk-search { padding: 9px 14px 9px 34px; border: 2px solid var(--gray-200); border-radius: 8px; font-size: 13px; width: 240px; max-width: 100%; font-family: inherit; }
.isk-search:focus { outline: none; border-color: var(--primary); }
.isk-stat-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.isk-stat-badge { display: flex; align-items: center; gap: 6px; background: var(--light-blue); color: var(--dark-blue); border-radius: 8px; padding: 7px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.isk-stat-badge i { color: var(--primary); font-size: 12px; }
.isk-stat-badge b { font-weight: 800; }
.isk-cost-badge { background: rgba(40,167,69,0.12); color: var(--success); cursor: pointer; transition: var(--transition); }
.isk-cost-badge i { color: var(--success); }
.isk-cost-badge:hover { background: rgba(40,167,69,0.22); }
.isk-cost-modal { width: 700px; max-width: 95vw; }
.isk-cost-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.isk-cost-table th, .isk-cost-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-200); text-align: left; }
.isk-cost-table thead th { background: var(--light-blue); color: var(--dark-blue); font-weight: 700; }
.isk-cost-table tbody tr:hover { background: var(--gray-100); }
.isk-cost-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.isk-cost-table tfoot td { font-weight: 800; border-top: 2px solid var(--gray-200); border-bottom: none; }
.isk-cost-empty { padding: 16px 24px; color: var(--gray-500); font-size: 13px; }
.isk-export-btn { background: var(--surface); color: var(--primary); border: 2px solid var(--primary); padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: var(--transition); white-space: nowrap; }
.isk-export-btn:hover { background: var(--light-blue); }
th.isk-sortable { cursor: pointer; user-select: none; position: relative; }
.isk-sort-icon { margin-left: 6px; opacity: 0.6; font-size: 11px; }

/* Colunas redimensionáveis (arrastar borda, tipo Excel) — só nas tabelas da Infra Interna Sky.
   table-layout fixed é aplicado via JS (iskApplyColumnWidths) só depois de medir a largura
   natural das colunas — se fosse fixo aqui no CSS, a 1ª renderização já sairia com o layout
   fixo (colunas espalhadas igualmente) e a medição capturaria esse espalhamento errado. */
.isk-table th, .isk-table td { overflow: hidden; text-overflow: ellipsis; }
.isk-table td { white-space: nowrap; }
.isk-col-resizer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 6px;
  cursor: col-resize; z-index: 1;
}
.isk-col-resizer:hover, .isk-col-resizer.isk-col-resizer-active { background: var(--primary); opacity: 0.5; }
.isk-empty-row td { text-align: center; padding: 28px; color: var(--gray-500); }
.isk-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 14px; flex-wrap: wrap; }
.isk-page-btn { min-width: 32px; height: 32px; padding: 0 8px; border: 2px solid var(--gray-200); background: var(--surface); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; transition: var(--transition); }
.isk-page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.isk-page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.isk-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.isk-expand-btn { background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 13px; padding: 4px; }
.isk-expand-btn:hover { color: var(--primary); }
.isk-related-row td { background: var(--gray-100); padding: 12px 20px; }
.isk-related-title { font-size: 12px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.isk-related-list { display: flex; flex-direction: column; gap: 6px; }
.isk-related-item { font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.isk-related-item-toggle { cursor: pointer; }
.isk-related-chevron { font-size: 11px; color: var(--gray-500); width: 10px; }
.isk-related-item-detail { margin: 2px 0 8px 20px; padding: 8px 12px; background: var(--surface); border-radius: 6px; border: 1px solid var(--gray-200); }
.isk-related-detail-row { font-size: 12px; color: var(--text); margin-bottom: 4px; }
.isk-related-detail-row:last-child { margin-bottom: 0; }
.isk-related-detail-label { font-weight: 700; color: var(--gray-500); text-transform: uppercase; font-size: 10px; letter-spacing: 0.5px; margin-right: 4px; }
.isk-related-empty { font-size: 13px; color: var(--gray-500); }
.isk-related-block { margin-bottom: 16px; }
.isk-related-block:last-child { margin-bottom: 0; }
.isk-related-edit-btn, .isk-related-del-btn { width: 24px; height: 24px; font-size: 11px; }

/* CRUD inline dentro de uma lista relacionada (hoje só Portas de Dispositivo, dentro de
   Dispositivo de Rede — sem aba própria no menu, ver js/infra-sky.js iskWireEditableRelatedLists) */
.isk-related-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.isk-related-form-input {
  padding: 7px 10px; border: 2px solid var(--gray-200); border-radius: 6px;
  font-size: 12px; font-family: inherit; width: 140px; max-width: 100%;
}
.isk-related-form-input:focus { outline: none; border-color: var(--primary); }
.isk-related-form .eq-btn-save, .isk-related-form .eq-btn-cancel { padding: 7px 14px; font-size: 12px; }

.isk-cols-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; }
.isk-cols-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; font-size: 13px; color: var(--text);
  border-radius: 6px; cursor: pointer; transition: var(--transition);
}
.isk-cols-item:hover { background: var(--gray-100); }
.isk-cols-item input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.isk-cols-grip {
  color: var(--gray-300);
  cursor: grab;
  touch-action: none; /* sem isso, Pointer Events em touch viram scroll e o drag não inicia */
  padding: 2px 2px 2px 0;
  flex-shrink: 0;
}
.isk-cols-item:hover .isk-cols-grip { color: var(--gray-500); }
.isk-cols-item.isk-dragging {
  position: fixed; /* o helper posiciona via left/top — precisa sair do fluxo da lista */
  z-index: 2000;   /* acima do .eq-modal-overlay (1000) */
  margin: 0;
  pointer-events: none;
  cursor: grabbing;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  transition: none;
}

@media (max-width: 700px) {
  .isk-search { width: 100%; }
  .isk-toolbar-left, .isk-toolbar-actions { width: 100%; }
}

/* Mapa de Rede — Infra Interna Sky (Visão Geral) */
.netmap-section { margin-top: 32px; }
.netmap-subtitle {
  font-size: 16px; color: var(--dark-blue); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.netmap-subtitle i { color: var(--primary); }

.netmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.netmap-block {
  background: var(--surface);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  cursor: grab;
}
.netmap-block:hover { box-shadow: var(--shadow-hover); }
.netmap-block.is-off { opacity: 0.8; }

.netmap-server-node {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.netmap-server-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--white); flex-shrink: 0;
  background: linear-gradient(135deg,#3B82F6,#1D4ED8);
}
.netmap-block.is-off .netmap-server-icon { background: linear-gradient(135deg, var(--gray-500), var(--gray-300)); }
.netmap-server-info { flex: 1; min-width: 0; }
.netmap-server-name { font-size: 15px; font-weight: 700; color: var(--dark-blue); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.netmap-server-detail { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.netmap-server-ip { font-size: 11px; font-family: 'Consolas', monospace; color: var(--gray-500); margin-top: 2px; }
.netmap-vm-count { font-size: 11px; font-weight: 700; color: var(--gray-500); white-space: nowrap; align-self: center; }

.netmap-status { font-size: 12px; font-weight: 600; color: var(--gray-500); display: inline-flex; align-items: center; }
.status-dot-off { background: var(--gray-500); }

.netmap-vms-wrap { padding: 14px 18px 18px; }
.netmap-vms-empty { font-size: 12px; color: var(--gray-500); text-align: center; padding: 6px 0; }
.netmap-vms-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.netmap-vm-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 8px;
  padding: 8px 12px; font-size: 12px; transition: var(--transition);
  cursor: grab;
}
.netmap-vm-chip:hover { border-color: #6366F1; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.netmap-block.isk-dragging,
.netmap-vm-chip.isk-dragging {
  position: fixed;
  z-index: 2000;
  margin: 0;
  pointer-events: none;
  cursor: grabbing;
  opacity: 0.96;
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  transition: none;
}
.isk-drag-placeholder {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-100);
  opacity: 0.6;
  flex-shrink: 0;
}
.netmap-vm-chip-icon {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--white); flex-shrink: 0;
  background: linear-gradient(135deg,#6366F1,#4F46E5);
}
.netmap-vm-chip-name { font-weight: 700; color: var(--text); }
.netmap-vm-chip-detail { color: var(--gray-500); font-size: 11px; }

.netmap-cloud-section { margin-top: 8px; margin-bottom: 20px; }
.netmap-cloud-header { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--dark-blue); margin-bottom: 12px; }
.netmap-cloud-header i { color: #0EA5E9; }

.netmap-cloud-group { margin-bottom: 20px; }
.netmap-cloud-group-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.netmap-cloud-group-logo {
  width: 20px; height: 20px; border-radius: 5px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.netmap-cloud-group-logo svg { width: 100%; height: 100%; display: block; }
.netmap-cloud-group-logo i { font-size: 13px; color: #0EA5E9; }
.netmap-cloud-group-name { font-size: 12px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.03em; }
.netmap-cloud-group-count {
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 20px;
  padding: 1px 8px; margin-left: -2px;
}

.netmap-cloud-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px; margin-bottom: 8px;
}
.netmap-cloud-group:last-child { margin-bottom: 0; }
.netmap-cloud-group .netmap-cloud-grid { margin-bottom: 0; }
.netmap-cloud-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 12px 14px; box-shadow: var(--shadow); transition: var(--transition);
}
.netmap-cloud-chip:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.netmap-cloud-chip-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 14px; flex-shrink: 0;
  background: var(--gray-100); border: 1px solid var(--gray-200); overflow: hidden;
}
.netmap-cloud-chip-icon svg { width: 100%; height: 100%; display: block; }
.netmap-cloud-chip-icon i { color: #0EA5E9; }
.netmap-cloud-chip-name { font-size: 13px; font-weight: 700; color: var(--dark-blue); }
.netmap-cloud-chip-detail { font-size: 11px; color: var(--gray-500); }

.netmap-empty {
  text-align: center; padding: 28px; color: var(--gray-500); font-size: 13px;
  background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--gray-300);
}

.netmap-legend { margin-top: 8px; }

@media (max-width: 700px) {
  .netmap-server-node { flex-direction: column; }
  .netmap-vm-count { align-self: flex-start; }
  .netmap-cloud-grid { grid-template-columns: 1fr; }
}

/* Topologia da Rede — árvore (listagem hierárquica) e diagrama (organograma-like, reaproveita
   .org-chart/.org-level/.org-branch/.org-team de organograma.js) */
.topo-tree, .topo-tree-children { list-style: none; margin: 0; padding: 0; }
.topo-tree > li { margin-bottom: 14px; }
.topo-tree-children {
  margin-top: 10px;
  padding-left: 26px;
  border-left: 2px solid var(--gray-200);
}
.topo-tree-children > li { margin-top: 10px; }
.topo-tree-node {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  background: var(--surface); border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; font-weight: 700; color: var(--dark-blue);
  transition: var(--transition);
}
.topo-tree-node i { color: var(--primary); }
.topo-tree-node-meta { font-size: 12px; font-weight: 600; color: var(--gray-500); }
.topo-tree-node.is-dimmed { opacity: 0.35; }
.topo-tree-node.is-match { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,130,246,0.15); }
.topo-tree > li > .isk-related-title,
.topo-tree-children > li > .isk-related-title { margin: 10px 0 6px 4px; }
.topo-tree > li > .isk-related-list,
.topo-tree-children > li > .isk-related-list { padding-left: 4px; }

/* Diagrama — paleta por papel do dispositivo (usada tanto nos cards quanto na legenda) */
.topo-card-roteador .topo-card-icon,
.topo-legend-dot-roteador { background: linear-gradient(135deg, #2563EB, #1D4ED8); }
.topo-card-switch_core .topo-card-icon,
.topo-legend-dot-core { background: linear-gradient(135deg, #7C3AED, #6D28D9); }
.topo-card-switch_distribuicao .topo-card-icon,
.topo-legend-dot-dist { background: linear-gradient(135deg, #059669, #047857); }
.topo-cloud-icon,
.topo-legend-dot-cloud { background: linear-gradient(135deg, #0EA5E9, #0284C7); }
.topo-sala-icon,
.topo-legend-dot-sala { background: linear-gradient(135deg, #F59E0B, #D97706); }
.topo-card-roteador { border-top: 3px solid #2563EB; }
.topo-card-switch_core { border-top: 3px solid #7C3AED; }
.topo-card-switch_distribuicao { border-top: 3px solid #059669; }

.topo-diagram-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-bottom: 20px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--gray-200); border-radius: 10px;
  font-size: 12px; color: var(--gray-500); font-weight: 600;
}
.topo-legend-item, .topo-legend-line { display: flex; align-items: center; gap: 6px; }
.topo-legend-dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.topo-legend-stroke { width: 22px; height: 0; border-top: 2.5px solid var(--gray-300); flex-shrink: 0; }
.topo-legend-stroke-wan { border-top-color: #DC2626; }
.topo-legend-stroke-lan { border-top-color: #1E3A8A; }
.topo-legend-stroke-uplink { border-top-color: #D97706; border-top-style: dashed; }

.topo-chart {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 44px;
  padding: 8px 16px 40px;
  background:
    radial-gradient(circle, var(--gray-200) 1px, transparent 1px);
  background-size: 22px 22px;
  border-radius: var(--radius);
}
:root[data-theme="dark"] .topo-chart { background-image: radial-gradient(circle, var(--gray-300) 1px, transparent 1px); opacity: 1; }
.topo-connectors-svg { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
.topo-connector-line { fill: none; stroke: #1E3A8A; stroke-width: 2.5px; stroke-linejoin: round; stroke-linecap: round; }
.topo-line-wan-0 { stroke: #DC2626; }
.topo-line-wan-1 { stroke: #16A34A; }
.topo-line-wan-2 { stroke: #0EA5E9; }
.topo-line-uplink { stroke: #D97706; stroke-dasharray: 7 5; }

.topo-port-labels { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.topo-port-label {
  position: absolute; transform: translate(-50%, -50%);
  background: var(--surface); border: 1px solid var(--gray-300); border-radius: 6px;
  padding: 2px 8px; font-size: 10px; font-weight: 700; color: var(--text);
  white-space: nowrap; box-shadow: var(--shadow);
}

.topo-row { display: flex; justify-content: center; position: relative; z-index: 1; }
.topo-row-clouds { gap: 28px; flex-wrap: wrap; }
.topo-row-core { width: 100%; }
.topo-row-branches { gap: 40px; flex-wrap: nowrap; width: 100%; overflow-x: auto; padding: 4px 4px 8px; }
.topo-core-group { display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; justify-content: center; }
.topo-branch { display: flex; flex-direction: column; align-items: center; }
.topo-branch-connector { width: 2px; height: 22px; background: var(--gray-300); }

.topo-card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  min-width: 210px;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}
.topo-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.topo-card-head { display: flex; align-items: center; gap: 12px; }
.topo-card-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--white);
}
.topo-card-name { font-size: 14px; font-weight: 700; color: var(--dark-blue); }
.topo-card-detail { font-size: 11px; color: var(--gray-500); }

/* Trilho de portas — chips numerados com destino embaixo, no espírito de um Mikrotik/switch
   de verdade (etiqueta física sob cada porta) */
.topo-port-rail { display: flex; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--gray-200); flex-wrap: wrap; }
.topo-port-chip { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; min-width: 44px; }
.topo-port-num {
  width: 22px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--white);
  background: var(--gray-500);
}
.topo-port-chip-wan .topo-port-num { background: #DC2626; }
.topo-port-chip-uplink .topo-port-num { background: #D97706; }
.topo-port-dest { font-size: 9px; color: var(--gray-500); text-align: center; line-height: 1.2; max-width: 60px; }

.topo-cloud {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  min-width: 140px;
  position: relative; z-index: 1;
}
.topo-cloud-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--white); margin-bottom: 4px;
}
.topo-cloud-name { font-size: 13px; font-weight: 700; color: var(--dark-blue); }
.topo-cloud-detail { font-size: 10px; color: var(--gray-500); }

.topo-equip-panel {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  min-width: 260px; max-width: 420px;
}
.topo-equip-panel-title {
  font-size: 12px; font-weight: 700; color: var(--gray-500); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.topo-equip-groups { display: flex; flex-direction: column; gap: 8px; }
.topo-equip-group-label {
  font-size: 11px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.topo-equip-group-items { display: flex; flex-wrap: wrap; gap: 6px; }
.topo-equip-tag {
  background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 6px;
  padding: 4px 9px; font-size: 11px; color: var(--text);
}

.topo-sala-card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  min-width: 180px;
}
.topo-sala-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--white); margin-bottom: 2px;
}
.topo-sala-name { font-size: 13px; font-weight: 700; color: var(--dark-blue); }
.topo-sala-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
.topo-sala-tag {
  background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 6px;
  padding: 3px 8px; font-size: 10px; color: var(--text);
}

@media (max-width: 900px) {
  .topo-chart { gap: 32px; }
  .topo-core-group { flex-direction: column; align-items: center; }
}

/* ===================================================================
   AGENDA DE IMPLANTAÇÕES (Sky Cloud.Desk) — js/implantacoes.js
   CSS portado de gantt_skycloud/index.html (POC) na Fase 4 do handoff
   (gantt_skycloud/PLAN.md). Escopado inteiro sob #implantacoes-root pra não
   colidir com o resto do portal (a POC tinha seu próprio pequeno design
   system, incl. classes genéricas como .card/.btn/.table-wrap que também
   existem, com outro visual, no restante do portal). As variáveis de cor
   da POC (--accent, --good, --critical, --ciano...) são redefinidas aqui
   dentro do escopo, então continuam valendo pros seletores desta seção
   sem precisar renomear var(--x) em lugar nenhum do js/implantacoes.js.
   =================================================================== */
#implantacoes-root {
  display: block;
  max-width: 100%;
  overflow-x: hidden; /* segunda camada de proteção além do .main{min-width:0} —
    garante que nada dentro do módulo (a timeline larga do Gantt, sobretudo)
    force o layout do portal a esticar; quem deve rolar é o .gt-rolagem interno */
  color-scheme: light;
  --surface-1: #fcfcfb;
  --page: #f4f4f2;
  --sidebar: #ffffff;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --border: rgba(11,11,11,0.10);
  --border-strong: rgba(11,11,11,0.18);
  --accent: #2a78d6;
  --good: #0ca30c;
  --warning: #eda100;
  --critical: #d03b3b;
  --violet: #4a3aa7;
  --aqua: #1baf7a;
  --magenta: #c2185b;
  --ciano: #0891b2;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(11,11,11,0.06), 0 1px 1px rgba(11,11,11,0.04);
  --shadow-md: 0 8px 24px rgba(11,11,11,0.14);
}
:root[data-theme="dark"] #implantacoes-root {
  color-scheme: dark;
  --surface-1: #1a1a19;
  --page: #0d0d0d;
  --sidebar: #151514;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid: #2c2c2a;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.20);
  --accent: #3987e5;
  --good: #0ca30c;
  --warning: #c98500;
  --critical: #e66767;
  --violet: #9085e9;
  --aqua: #199e70;
  --magenta: #ec6ba0;
  --ciano: #22a5c4;
}
#implantacoes-root * { box-sizing: border-box; }
#implantacoes-root html, #implantacoes-root body {
  margin: 0; padding: 0; height: 100%;
  background: var(--page); color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
#implantacoes-root button, #implantacoes-root input, #implantacoes-root select, #implantacoes-root textarea { font-family: inherit; font-size: inherit; color: inherit; }
#implantacoes-root button { cursor: pointer; }
#implantacoes-root .shell { display: flex; flex-direction: column; min-height: 100vh; }
#implantacoes-root .appbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--sidebar); border-bottom: 1px solid var(--border);
}
#implantacoes-root .appbar-row {
  max-width: 1560px; margin: 0 auto; width: 100%;
  padding: 6px 20px; display: flex; align-items: center; gap: 11px;
}
#implantacoes-root .brand { display: flex; align-items: center; gap: 7px; flex: none; }
#implantacoes-root .brand-mark {
  width: 23px; height: 23px; flex: none; border-radius: 6px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: -0.02em;
}
#implantacoes-root .brand-name { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; }
#implantacoes-root .brand-sub { display: none; }
#implantacoes-root .brand-sep { width: 1px; height: 20px; background: var(--border); flex: none; }
#implantacoes-root .nav { display: flex; gap: 1px; align-items: center; overflow-x: auto; scrollbar-width: none; }
#implantacoes-root .nav::-webkit-scrollbar { display: none; }
#implantacoes-root .nav-item {
  border: none; background: transparent; border-radius: 7px;
  padding: 5px 10px; font-size: 12.5px; font-weight: 550;
  color: var(--text-secondary); white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
#implantacoes-root .nav-item:hover { background: var(--page); color: var(--text-primary); }
#implantacoes-root .nav-item.active { background: var(--accent); color: #fff; }
#implantacoes-root .nav-item .ico { display: inline-flex; align-items: center; opacity: .85; }
#implantacoes-root .nav-item .ico svg { width: 15px; height: 15px; display: block; }
#implantacoes-root .nav-item.active .ico { opacity: 1; }
#implantacoes-root .appbar .search-input { padding: 5px 9px; font-size: 12.5px; min-width: 190px; border-radius: 7px; }
#implantacoes-root .appbar .btn { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; box-shadow: none; }
#implantacoes-root .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#implantacoes-root .content { max-width: 1560px; margin: 0 auto; width: 100%; padding: 18px 24px 40px; }
#impl-pageBody { width: 100%; max-width: 100%; overflow-x: hidden; }
#implantacoes-root .topbar { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
#implantacoes-root .topbar h1 { font-size: 19px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
#implantacoes-root .topbar .sub { font-size: 12.5px; color: var(--text-secondary); }
#implantacoes-root .topbar .spacer { flex: 1; }
#implantacoes-root .page-foot {
  max-width: 1560px; margin: 0 auto; width: 100%;
  padding: 18px 24px 40px; font-size: 11px; color: var(--text-muted);
  line-height: 1.6; border-top: 1px solid var(--border);
}
@media (max-width: 1100px) {
#implantacoes-root .appbar-row { flex-wrap: wrap; padding-bottom: 4px; }
#implantacoes-root .nav { order: 3; width: 100%; padding-bottom: 3px; }
#implantacoes-root .brand-sep { display: none; }


}
#implantacoes-root .btn {
  border: 1px solid var(--border); background: var(--surface-1); border-radius: 9px;
  padding: 8px 13px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm);
}
#implantacoes-root .btn:hover { border-color: var(--border-strong); }
#implantacoes-root .btn-primary { background: var(--accent); color: #fff; border-color: transparent; }
#implantacoes-root .btn-primary:hover { filter: brightness(1.07); }
#implantacoes-root .btn-danger { background: transparent; border-color: var(--critical); color: var(--critical); box-shadow: none; }
#implantacoes-root .btn-good { background: transparent; border-color: var(--good); color: var(--good); box-shadow: none; }
#implantacoes-root .btn-ghost { background: transparent; border: none; box-shadow: none; color: var(--text-secondary); padding: 7px 9px; }
#implantacoes-root .btn-ghost:hover { background: var(--grid); color: var(--text-primary); }
#implantacoes-root .btn[disabled] { opacity: .38; cursor: default; }
#implantacoes-root .btn[disabled]:hover { border-color: var(--border); }
#implantacoes-root .search-input, #implantacoes-root .filter-select {
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px;
  font-size: 13px; background: var(--surface-1);
}
#implantacoes-root .search-input { min-width: 210px; }
#implantacoes-root .seg { display: flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; box-shadow: var(--shadow-sm); }
#implantacoes-root .seg button { border: none; padding: 8px 14px; font-size: 13px; font-weight: 600; background: var(--surface-1); color: var(--text-secondary); }
#implantacoes-root .seg button + button { border-left: 1px solid var(--border); }
#implantacoes-root .seg button.active { background: var(--accent); color: #fff; }
#implantacoes-root .chip {
  border: 1px solid var(--border); background: var(--surface-1); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 550; color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 6px;
}
#implantacoes-root .chip .swatch { width: 8px; height: 8px; border-radius: 50%; }
#implantacoes-root .chip.active { background: var(--text-primary); color: var(--surface-1); border-color: var(--text-primary); }
#implantacoes-root .toolbar {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
#implantacoes-root .toolbar .hint { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 700; }
#implantacoes-root .kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
@media (max-width: 1400px) {
#implantacoes-root .kpi-row { grid-template-columns: repeat(3, 1fr); }
 
}
@media (max-width: 900px) {
#implantacoes-root .kpi-row { grid-template-columns: repeat(2, 1fr); }
 
}
#implantacoes-root .kpi {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 13px; box-shadow: var(--shadow-sm); min-width: 0;
  display: flex; flex-direction: column;
}
#implantacoes-root .kpi-corpo { display: flex; align-items: flex-end; gap: 12px; margin: auto 0; }
#implantacoes-root .kpi-corpo .value { margin: 0; flex: 0 0 auto; }
#implantacoes-root .kpi-corpo .note { flex: 1 1 auto; min-width: 0; margin: 0 0 3px 0; }
#implantacoes-root .kpi-lembrete .lembr-lista { margin-top: 2px; }
#implantacoes-root .kpi-lembrete .lembr-mais { margin-top: auto; padding-top: 8px; }
#implantacoes-root .kpi .label { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px;
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#implantacoes-root .kpi .value { font-size: 34px; font-weight: 650; letter-spacing: -0.015em; line-height: 1; }
#implantacoes-root .kpi .note { font-size: 15.5px; line-height: 1.25; color: var(--text-muted); }
#implantacoes-root .kpi-central { text-align: center; justify-content: center; }
#implantacoes-root .kpi-central .label { font-size: 15px; white-space: normal; text-align: center; }
#implantacoes-root .kpi-central .kpi-corpo { justify-content: center; }
#implantacoes-root .kpi-central .value { font-size: 38px; }
#implantacoes-root .kpi-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--grid); margin-top: 9px; }
#implantacoes-root .kpi-bar .seg-fill { height: 100%; }
#implantacoes-root .kpi-legend { display: flex; gap: 11px; margin-top: 9px; flex-wrap: wrap; }
#implantacoes-root .kpi-legend .item { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-secondary); }
#implantacoes-root .kpi-legend .dot { width: 8px; height: 8px; border-radius: 2px; }
#implantacoes-root .card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-left: 3px solid var(--etapa-color, var(--accent));
  border-radius: 9px; padding: 8px 10px; box-shadow: var(--shadow-sm);
  text-align: left; width: 100%; cursor: grab; display: block;
}
#implantacoes-root .card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
#implantacoes-root .card.dragging { opacity: .38; }
#implantacoes-root .card .cli { font-size: 12px; font-weight: 650; line-height: 1.28; }
#implantacoes-root .card .loc { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
#implantacoes-root .card .meta { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; }
#implantacoes-root .resp-nome {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 5px;
  font-size: 11px; font-weight: 700; color: var(--text-primary);
  background: var(--grid); border-radius: 999px; padding: 2px 8px;
}
#implantacoes-root .resp-nome::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--etapa-color, var(--accent)); flex: none; }
#implantacoes-root .resp-vazio {
  display: inline-block; margin-top: 5px; font-size: 10.5px; font-style: italic;
  color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: 999px; padding: 1px 8px;
}
#implantacoes-root .card .tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
#implantacoes-root .tag {
  font-size: 10px; font-weight: 700; padding: 1.5px 7px; border-radius: 999px;
  border: 1px solid currentColor; white-space: nowrap;
}
#implantacoes-root .tag-solid { color: #fff; border-color: transparent; }
#implantacoes-root .tag-muted { color: var(--text-muted); border-color: var(--border-strong); font-weight: 600; }
#implantacoes-root .empty { padding: 44px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
#implantacoes-root .cal-head {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 8px;
}
#implantacoes-root .cal-head div {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
  color: var(--text-muted); text-align: center; padding: 4px 0;
}
#implantacoes-root .cal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
#implantacoes-root .cal-cell {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px; min-height: 118px; display: flex; flex-direction: column; gap: 6px;
}
#implantacoes-root .cal-cell.other-month { opacity: .45; }
#implantacoes-root .cal-cell.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
#implantacoes-root .cal-cell.drop-hot { background: var(--grid); outline: 2px dashed var(--accent); outline-offset: -3px; }
#implantacoes-root .cal-daynum { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
#implantacoes-root .cal-cell.today .cal-daynum { color: var(--accent); }
#implantacoes-root .cal-more { font-size: 10.5px; color: var(--text-muted); }
#implantacoes-root .week-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
#implantacoes-root .week-col {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; min-height: 260px; display: flex; flex-direction: column; gap: 7px;
}
#implantacoes-root .week-col.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
#implantacoes-root .week-col.drop-hot { background: var(--grid); outline: 2px dashed var(--accent); outline-offset: -3px; }
#implantacoes-root .week-colhead { display: flex; align-items: baseline; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--grid); }
#implantacoes-root .week-colhead .wd { font-size: 11px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
#implantacoes-root .week-colhead .dn { font-size: 17px; font-weight: 700; }
#implantacoes-root .week-col.today .week-colhead .dn { color: var(--accent); }
#implantacoes-root .day-wrap { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
#implantacoes-root .day-title { font-size: 17px; font-weight: 650; margin: 0 0 2px; }
#implantacoes-root .day-sub { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 16px; }
#implantacoes-root .day-list { display: flex; flex-direction: column; gap: 10px; }
#implantacoes-root .equipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
#implantacoes-root .split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 1080px) {
#implantacoes-root .split2 { grid-template-columns: 1fr; }
 
}
#implantacoes-root .eq-list { display: flex; flex-direction: column; }
#implantacoes-root .eq-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 2px; border-bottom: 1px solid var(--grid); font-size: 12.5px;
}
#implantacoes-root .eq-row:last-child { border-bottom: none; }
#implantacoes-root .eq-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
#implantacoes-root .eq-nome { font-weight: 650; white-space: nowrap; min-width: 128px; }
#implantacoes-root .eq-oque {
  flex: 1; min-width: 0; font-size: 11.5px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#implantacoes-root .eq-tag { flex: none; }
#implantacoes-root .eq-agenda-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 2px;
  font-size: 10.5px; color: var(--text-muted);
  border-bottom: 1px solid var(--grid);
}
#implantacoes-root .eq-agenda-item:last-child { border-bottom: none; }
#implantacoes-root .eq-agenda-cli { font-weight: 600; color: var(--text-primary); white-space: nowrap; }
#implantacoes-root .eq-agenda-loc { color: var(--text-muted); white-space: nowrap; }
#implantacoes-root .eq-agenda-etapa { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#implantacoes-root .eq-agenda-data { flex: none; }
#implantacoes-root .alerta {
  background: var(--surface-1); border: 1px solid var(--border);
  border-left: 3px solid var(--critical); border-radius: var(--radius);
  padding: 12px 15px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
#implantacoes-root .alerta-topo { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 8px; }
#implantacoes-root .alerta-ico {
  width: 18px; height: 18px; border-radius: 50%; background: var(--critical); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex: none;
}
#implantacoes-root .alerta-linha {
  display: flex; gap: 10px; align-items: baseline; padding: 5px 0 5px 26px;
  border-top: 1px solid var(--grid); font-size: 12.5px;
}
#implantacoes-root .alerta-sem { font-weight: 650; white-space: nowrap; min-width: 168px; }
#implantacoes-root .alerta-cli { color: var(--text-secondary); }
#implantacoes-root .card.presencial { box-shadow: var(--shadow-sm), inset 3px 0 0 0 var(--etapa-color); }
#implantacoes-root .ck-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--grid); }
#implantacoes-root .ck-row:last-child { border-bottom: none; }
#implantacoes-root .ck-row select { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; background: var(--page); font-size: 12px; flex: none; width: 128px; }
#implantacoes-root .ck-row input { border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; background: var(--page); }
#implantacoes-root .ck-row input[data-f="texto"] { flex: 1.1; }
#implantacoes-root .ck-row input[data-f="obs"] { flex: 1.4; font-size: 12.5px; }
#implantacoes-root .btn-check { padding: 5px 7px; display: inline-flex; }
#implantacoes-root .btn-check svg { width: 17px; height: 17px; display: block; }
#implantacoes-root .btn-check:hover { color: var(--accent); }
#implantacoes-root .tag-pres {
  font-size: 9.5px; font-weight: 800; letter-spacing: .03em;
  color: #fff; background: var(--critical); border-radius: 999px; padding: 1.5px 6px;
}
#implantacoes-root .day-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border: 1px solid var(--border); border-left: 3px solid var(--etapa-color, var(--accent));
  border-radius: 10px; background: var(--page);
}
#implantacoes-root .day-row[data-id] { cursor: pointer; }
#implantacoes-root .day-row .who { flex: 1; min-width: 0; }
#implantacoes-root .day-row .cli { font-size: 14px; font-weight: 650; }
#implantacoes-root .day-row .loc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
#implantacoes-root .day-row .prog { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
#implantacoes-root .table-wrap { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
#implantacoes-root .tbl-rolagem { overflow: auto; max-height: 64vh;
          scrollbar-width: auto; scrollbar-color: var(--border-strong) var(--grid); }
#implantacoes-root .tbl-rolagem::-webkit-scrollbar { height: 12px; width: 12px; }
#implantacoes-root .tbl-rolagem::-webkit-scrollbar-track { background: var(--grid); }
#implantacoes-root .tbl-rolagem::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
#implantacoes-root .tbl-rolagem::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
#implantacoes-root table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
#implantacoes-root table.tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-1); }
#implantacoes-root table.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); padding: 11px 13px; border-bottom: 1px solid var(--grid); cursor: pointer; white-space: nowrap;
}
#implantacoes-root table.tbl th:hover { color: var(--text-primary); }
#implantacoes-root table.tbl td { padding: 10px 13px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
#implantacoes-root table.tbl tbody tr:hover { background: var(--page); cursor: pointer; }
#implantacoes-root table.tbl tbody tr:last-child td { border-bottom: none; }
#implantacoes-root .strip { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--grid); }
#implantacoes-root .strip i { display: block; height: 100%; }
#implantacoes-root .strip-legend { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
#implantacoes-root .strip-legend span { font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; }
#implantacoes-root .strip-legend .d { width: 8px; height: 8px; border-radius: 2px; }
#implantacoes-root .tbl td { padding: 7px 12px; }
#implantacoes-root .tbl th { padding: 8px 12px; }
#implantacoes-root .tbl-sub { font-size: 11px; color: var(--text-muted); margin-left: 8px; }
#implantacoes-root .linha-tags { display: flex; align-items: center; gap: 7px; flex: none; }
#implantacoes-root .tag.req, #implantacoes-root .tag.tag-etapa {
           font-size: 12px; font-weight: 700; letter-spacing: .01em; padding: 5px 11px;
           border-radius: 8px; color: #fff; display: inline-flex; align-items: center; gap: 6px; }
#implantacoes-root .tag.req::before, #implantacoes-root .tag.tag-etapa::before {
           content: ''; width: 7px; height: 7px; border-radius: 50%;
           background: rgba(255,255,255,.85); flex: none; }
#implantacoes-root .tag.req-ok { background: var(--good); }
#implantacoes-root .tag.req-nao { background: var(--warning); color: #3d2f00; }
#implantacoes-root .tag.req-nao::before { background: rgba(0,0,0,.35); }
#implantacoes-root .tag.req-sem { background: var(--critical); }
#implantacoes-root .req-lista { display: flex; flex-direction: column; gap: 7px; width: 100%; }
#implantacoes-root .req-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px;
            color: var(--text-primary); line-height: 1.35; }
#implantacoes-root .req-txt { flex: 1; min-width: 0; line-height: 1.3; }
#implantacoes-root .req-seg3 { display: flex; flex: none; border: 1px solid var(--border); border-radius: 8px;
            overflow: hidden; background: var(--surface-1); }
#implantacoes-root .req-seg3 button { border: none; background: transparent; color: var(--text-muted);
                   font-size: 10px; font-weight: 600; padding: 4px 7px; white-space: nowrap; }
#implantacoes-root .req-seg3 button + button { border-left: 1px solid var(--border); }
#implantacoes-root .req-seg3 button:hover { background: var(--page); color: var(--text-primary); }
#implantacoes-root .req-seg3 button.ativo { color: #fff; font-weight: 700; }
#implantacoes-root .req-seg3 button.ativo.st-ok { background: var(--good); }
#implantacoes-root .req-seg3 button.ativo.st-nao { background: var(--warning); color: #3d2f00; }
#implantacoes-root .req-seg3 button.ativo.st-sem { background: var(--critical); }
#implantacoes-root .req-resumo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
#implantacoes-root .req-tag { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
           white-space: nowrap; }
#implantacoes-root .req-tag.req-ok { background: rgba(12,163,12,.14); color: #0a7d0a; }
#implantacoes-root .req-tag.req-nao { background: rgba(237,161,0,.18); color: #8a6100; }
#implantacoes-root .req-tag.req-sem { background: rgba(208,59,59,.14); color: var(--critical); }
#implantacoes-root .req-seg { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
#implantacoes-root .req-seg button { border: 1px solid var(--border); background: var(--page); border-radius: 9px;
                  padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
                  color: var(--text-secondary); font-family: inherit; }
#implantacoes-root .req-seg button:hover { border-color: var(--border-strong); }
#implantacoes-root .req-seg button.active { color: #fff; border-color: transparent; }
#implantacoes-root .req-seg button.active.req-sem { background: var(--critical); }
#implantacoes-root .req-seg button.active.req-nao { background: var(--warning); color: #3d2f00; }
#implantacoes-root .req-seg button.active.req-ok { background: var(--good); }
#implantacoes-root .kpi-lembrete { min-width: 0; }
#implantacoes-root .kpi-lembrete .label { margin-bottom: 8px; }
#implantacoes-root .lembr-lista { display: flex; flex-direction: column; gap: 1px; }
#implantacoes-root .lembr { display: flex; align-items: baseline; gap: 7px; padding: 4px 5px; border-radius: 6px;
         cursor: pointer; border-left: 2px solid var(--magenta, #c2185b); }
#implantacoes-root .lembr:hover { background: var(--page); }
#implantacoes-root .lembr-data { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); flex: none;
              width: 38px; font-variant-numeric: tabular-nums; }
#implantacoes-root .lembr-cli { font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0;
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#implantacoes-root .lembr-cid { font-weight: 500; color: var(--text-muted); font-size: 11px; }
#implantacoes-root .lembr-quando { font-size: 11px; color: var(--text-muted); flex: none; }
#implantacoes-root .lembr.hoje { background: rgba(194,24,91,.07); }
#implantacoes-root .lembr.hoje .lembr-quando { color: var(--magenta, #c2185b); font-weight: 700; }
#implantacoes-root .lembr.atrasado .lembr-quando { color: var(--critical); font-weight: 700; }
#implantacoes-root .lembr-mais { margin-top: 7px; border: 0; background: none; padding: 0 6px; cursor: pointer;
              font-size: 12.5px; font-weight: 600; color: var(--accent); font-family: inherit;
              text-align: left; }
#implantacoes-root .lembr-mais:hover { text-decoration: underline; }
#implantacoes-root .lembr-ok { flex: none; width: 17px; height: 17px; border-radius: 5px; cursor: pointer;
            border: 1px solid var(--border-strong); background: var(--surface-1);
            color: var(--text-muted); font-size: 10px; line-height: 1; padding: 0;
            display: flex; align-items: center; justify-content: center; }
#implantacoes-root .lembr-ok:hover { background: var(--good); border-color: var(--good); color: #fff; }
#implantacoes-root .lembr-modal { max-height: 62vh; overflow-y: auto; }
#implantacoes-root .lembr-modal .lembr { padding: 7px 8px 2px; }
#implantacoes-root .lembr-loc { font-size: 11px; color: var(--text-muted); padding: 0 8px 8px 48px;
             border-left: 2px solid transparent; margin-bottom: 2px; }
#implantacoes-root .split2 > .day-wrap { display: flex; flex-direction: column; }
#implantacoes-root .gt-wrap { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1);
           overflow: hidden; width: 100%; max-width: 100%; }
#implantacoes-root .gt-rolagem { overflow: auto; max-height: 64vh; width: 100%; max-width: 100%;
          scrollbar-width: auto; scrollbar-color: var(--border-strong) var(--grid); }
#implantacoes-root .gt-rolagem::-webkit-scrollbar { height: 12px; width: 12px; }
#implantacoes-root .gt-rolagem::-webkit-scrollbar-track { background: var(--grid); }
#implantacoes-root .gt-rolagem::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
#implantacoes-root .gt-rolagem::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
#implantacoes-root .gt-linha, #implantacoes-root .gt-cab-linha { display: flex; align-items: stretch;
           min-width: calc(var(--gt-rot) + var(--gt-faixa)); }
#implantacoes-root .gt-rot { width: var(--gt-rot); flex: none; display: flex; align-items: stretch;
          border-right: 2px solid var(--border); background: var(--surface-1);
          position: sticky; left: 0; z-index: 2; }
#implantacoes-root .gt-cel { flex: none; min-width: 0; padding: 5px 10px; display: flex; align-items: center; gap: 7px;
          border-right: 1px solid var(--border); overflow: hidden; }
#implantacoes-root .gt-cel:last-child { border-right: none; }
#implantacoes-root .gt-cel.centro { justify-content: center; }
#implantacoes-root .gt-nm { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
#implantacoes-root .gt-vazio { color: var(--text-muted); font-size: 12px; }
#implantacoes-root .gt-num { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
#implantacoes-root .gt-per { font-size: 11.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums;
          white-space: nowrap; }
#implantacoes-root .gt-dias { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
#implantacoes-root .gt-faixa { position: relative; width: var(--gt-faixa); flex: none; display: flex; }
#implantacoes-root .gt-cab { position: sticky; top: 0; z-index: 3; background: var(--surface-1);
          border-bottom: 1px solid var(--border); }
#implantacoes-root .gt-cab-rot { font-size: 10px; font-weight: 700; text-transform: uppercase;
              letter-spacing: .04em; color: var(--text-muted); white-space: nowrap; }
#implantacoes-root .gt-mes { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
          color: var(--text-secondary); padding: 6px 8px; border-left: 1px solid var(--border);
          white-space: nowrap; overflow: hidden; }
#implantacoes-root .gt-dia { font-size: 10px; color: var(--text-muted); text-align: center; padding: 4px 0;
          font-variant-numeric: tabular-nums; }
#implantacoes-root .gt-corpo { width: max-content; min-width: 100%; }
#implantacoes-root .gt-dia.gt-corte { box-shadow: inset 1.5px 0 0 var(--border-strong); }
#implantacoes-root .gt-faixa {
  --gt-cor-hoje: rgba(8,145,178,.13);
  --gt-cor-fds: rgba(11,11,11,.085);
  background-repeat: no-repeat, repeat, repeat;
  background-position: var(--gt-hoje, -9999px) 0, var(--gt-fds, -9999px) 0, 0 0;
  background-image:
    linear-gradient(to right, var(--gt-cor-hoje) 0 var(--gt-col), transparent var(--gt-col)),
    repeating-linear-gradient(to right,
      var(--gt-cor-fds) 0 calc(2 * var(--gt-col)),
      transparent calc(2 * var(--gt-col)) calc(7 * var(--gt-col))),
    repeating-linear-gradient(to right,
      transparent 0 calc(var(--gt-col) - 1px),
      var(--border) calc(var(--gt-col) - 1px) var(--gt-col));
}
:root[data-theme="dark"] #implantacoes-root .gt-faixa { --gt-cor-fds: rgba(255,255,255,.075); }
#implantacoes-root .gt-cab .gt-faixa { background-image: none; }
#implantacoes-root .gt-dia.gt-fds { color: var(--text-muted); background: rgba(11,11,11,.085); }
:root[data-theme="dark"] #implantacoes-root .gt-dia.gt-fds { background: rgba(255,255,255,.075); }
#implantacoes-root .gt-dia.gt-hoje { color: #0891b2; font-weight: 700; background: rgba(8,145,178,.13);
                  box-shadow: inset 0 -2px 0 #0891b2; border-radius: 3px 3px 0 0; }
#implantacoes-root .gt-dia.gt-feriado { color: var(--critical); font-weight: 700;
                      box-shadow: inset 0 -2px 0 var(--critical); border-radius: 3px 3px 0 0; }
/* marcação de feriado no fundo da faixa (nacional em toda linha, customizado só na
   linha dos clientes da cidade/UF correspondente) — pinta por cima das barras/marcos
   (a barra da etapa abre um vão no dia de feriado, então nunca fica em cima dela) e
   aceita hover (sem pointer-events:none) pra mostrar o nome do feriado no title */
#implantacoes-root .gt-feriado-marca { position: absolute; top: 0; bottom: 0;
                    background: rgba(220,38,38,.09); box-shadow: inset 1px 0 0 rgba(220,38,38,.35), inset -1px 0 0 rgba(220,38,38,.35); }
:root[data-theme="dark"] #implantacoes-root .gt-feriado-marca { background: rgba(248,113,113,.13); }
#implantacoes-root .gt-mae { height: 52px; cursor: pointer; border-bottom: 1px solid var(--border); }
#implantacoes-root .gt-mae:hover .gt-cli { color: var(--accent); }
#implantacoes-root .gt-mae:hover .gt-chev { color: var(--accent); }
#implantacoes-root .gt-sub { height: 26px; cursor: pointer; border-bottom: 1px dotted var(--border); }
#implantacoes-root .gt-sub:hover .gt-et { color: var(--accent); }
#implantacoes-root .gt-sub .gt-rot { background: var(--surface-1); }
#implantacoes-root .gt-sub .gt-cel-cliente { padding-left: 32px; }
#implantacoes-root .gt-sub .gt-cel { padding-top: 0; padding-bottom: 0; }
#implantacoes-root .gt-mae.aberto { border-bottom-style: dotted; }
#implantacoes-root .gt-mae.aberto .gt-rot { box-shadow: inset 3px 0 0 var(--accent); }
#implantacoes-root .gt-sub.fora .gt-rot { opacity: .45; }
#implantacoes-root .gt-rot[data-toggle] { cursor: pointer; }
#implantacoes-root .gt-faixa[data-ficha] { cursor: pointer; }
#implantacoes-root .gt-sub .gt-cel-cliente .d { width: 7px; height: 7px; border-radius: 2px; flex: none; }
#implantacoes-root .gt-chev { width: 12px; flex: none; color: var(--text-muted); font-size: 11px; }
#implantacoes-root .gt-concluido { flex: none; width: 16px; display: flex; align-items: center;
           justify-content: center; color: var(--good); font-size: 13px; }
#implantacoes-root .gt-editar { flex: none; margin-left: auto; width: 22px; height: 22px; border-radius: 6px;
           border: none; background: transparent; color: var(--text-muted); font-size: 11px;
           display: flex; align-items: center; justify-content: center; cursor: pointer; }
#implantacoes-root .gt-editar:hover { background: var(--page); color: var(--accent); }
#implantacoes-root .gt-vinc { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
           padding: 1px 4px; border-radius: 3px; margin-right: 5px; }
#implantacoes-root .gt-vinc.tit { background: rgba(42,120,214,.12); color: var(--accent); }
#implantacoes-root .gt-vinc.int { background: rgba(237,161,0,.16); color: #8a6100; }
:root[data-theme="dark"] #implantacoes-root .gt-vinc.int { color: #eda100; }
#implantacoes-root .gt-resp { font-size: 12px; font-weight: 600; color: var(--text-secondary);
           white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#implantacoes-root .gt-resp.vazio { color: var(--text-muted); font-weight: 500; font-style: normal; }
#implantacoes-root .gt-cli { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden;
          text-overflow: ellipsis; }
#implantacoes-root .gt-et { font-size: 11.5px; font-weight: 550; white-space: nowrap; overflow: hidden;
         text-overflow: ellipsis; }
#implantacoes-root .gt-meta { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden;
           text-overflow: ellipsis; }
#implantacoes-root .gt-trilho { position: absolute; top: 50%; height: 0; transform: translateY(-50%);
             border-top: 1px dashed var(--border-strong); }
#implantacoes-root .gt-peca { position: absolute; top: 50%; height: 13px; transform: translateY(-50%);
           border-radius: 3px; }
#implantacoes-root .gt-sub .gt-peca { height: 11px; }
#implantacoes-root .gt-peca.corta-esq { border-top-left-radius: 0; border-bottom-left-radius: 0;
                     clip-path: polygon(5px 0, 100% 0, 100% 100%, 5px 100%, 0 50%); }
#implantacoes-root .gt-peca.corta-dir { border-top-right-radius: 0; border-bottom-right-radius: 0;
                     clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 50%, calc(100% - 5px) 100%, 0 100%); }
#implantacoes-root .gt-peca.corta-esq.corta-dir { clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 50%,
                     calc(100% - 5px) 100%, 5px 100%, 0 50%); }
#implantacoes-root .gt-marco { position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px;
            transform: rotate(45deg); border-radius: 2px; }
#implantacoes-root .gt-feita { color: var(--good); font-weight: 700; margin-left: 4px; }
#implantacoes-root .gt-ajustes { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); }
#implantacoes-root .gt-ajustes svg { width: 15px; height: 15px; }
#implantacoes-root .gt-ajustes:hover { color: var(--text-primary); }
#implantacoes-root .modal .seg { display: inline-flex; }
#implantacoes-root .modal:has(.etapa-cfg) { width: 600px; }
#implantacoes-root .etapa-cfg input[data-f="nome"] { min-width: 0; }
#implantacoes-root .etapa-cfg select { flex: none; width: 158px; font-size: 11.5px; padding: 5px 6px;
                    border: 1px solid var(--border); border-radius: 8px;
                    background: var(--page); color: var(--text-primary); }
#implantacoes-root .etapa-fixa { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
              color: var(--text-muted); width: 30px; text-align: center; flex: none; }
#implantacoes-root .ck-resumo { display: none; flex-direction: column; border-top: 1px solid var(--border);
             background: var(--surface-1); height: 44%; }
#implantacoes-root .ck-resumo.aberto { display: flex; }
#implantacoes-root .ck-res-topo { display: flex; align-items: center; gap: 8px; padding: 9px 14px;
               border-bottom: 1px solid var(--border); font-size: 13px; }
#implantacoes-root #ckResumoTexto { flex: 1; border: 0; resize: none; padding: 12px 16px; background: var(--page);
                 color: var(--text-primary); font-family: ui-monospace, "SFMono-Regular",
                 Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; }
#implantacoes-root #ckResumoTexto:focus { outline: none; }
#implantacoes-root .ck-corpo { flex: 1; display: flex; min-height: 0; }
#implantacoes-root .ck-corpo > iframe { flex: 1; min-width: 0; }
#implantacoes-root .ck-editor { width: 340px; flex: none; border-left: 1px solid var(--border);
             background: var(--surface); display: none; flex-direction: column; min-height: 0; }
#implantacoes-root .ck-editor.aberto { display: flex; }
#implantacoes-root .ck-ed-topo { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
#implantacoes-root .ck-ed-dica { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }
#implantacoes-root .ck-ed-lista { flex: 1; overflow-y: auto; padding: 10px 14px; }
#implantacoes-root .ck-ed-item { border: 1px solid var(--border); border-radius: 9px; padding: 10px;
              margin-bottom: 9px; background: var(--page); }
#implantacoes-root .ck-ed-l1 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#implantacoes-root .ck-ed-l1 input[type=checkbox] { width: 16px; height: 16px; flex: none; accent-color: var(--ciano); }
#implantacoes-root .ck-ed-item select { flex: none; width: 128px; font-size: 11.5px; padding: 4px 6px;
                     border: 1px solid var(--border); border-radius: 7px; background: var(--surface);
                     color: var(--text-primary); }
#implantacoes-root .ck-ed-item input[type=text] { width: 100%; font-size: 12px; padding: 6px 8px; margin-bottom: 5px;
                     border: 1px solid var(--border); border-radius: 7px; background: var(--surface);
                     color: var(--text-primary); }
#implantacoes-root .ck-ed-item input.obs { font-size: 11.5px; color: var(--text-secondary); margin-bottom: 5px; }
#implantacoes-root .ck-ed-item input.ajuste { margin-bottom: 0; border-left: 3px solid var(--warning); }
#implantacoes-root .ck-ed-item input.ajuste:not(:placeholder-shown) { background: #fff8e6; color: var(--text-primary); }
#implantacoes-root .ck-ed-item select { background: var(--surface-1); }
#implantacoes-root .ck-ed-item input[type=text] { background: var(--surface-1); }
#implantacoes-root .ck-ed-del { margin-left: auto; border: none; background: none; color: var(--critical);
             font-size: 17px; line-height: 1; cursor: pointer; padding: 0 4px; }
#implantacoes-root .ck-ed-pe { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
#implantacoes-root .overlay { position: fixed; inset: 0; background: rgba(11,11,11,.38); display: none; z-index: 50; }
#implantacoes-root .overlay.open { display: flex; }
#implantacoes-root .drawer-wrap { align-items: center; justify-content: center; padding: 20px; }
#implantacoes-root .drawer {
  width: 640px; max-width: 100%; max-height: 88vh; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-md);
  padding: 22px; overflow-y: auto; position: relative;
}
#implantacoes-root .modal-wrap { align-items: center; justify-content: center; padding: 20px; }
#implantacoes-root .modal {
  background: var(--surface-1); border-radius: 14px; padding: 22px; width: 640px; max-width: 100%;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-md); position: relative;
}
#implantacoes-root .close-x { position: absolute; top: 15px; right: 15px; border: 1px solid var(--border); background: var(--surface-1); border-radius: 8px; width: 30px; height: 30px; font-size: 15px; line-height: 1; }
#implantacoes-root .dh { font-size: 17px; font-weight: 650; margin: 0 0 3px; padding-right: 38px; }
#implantacoes-root .ds { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 4px; }
#implantacoes-root .sec-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin: 18px 0 8px; }
#implantacoes-root .field { margin-bottom: 12px; }
#implantacoes-root .field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; }
#implantacoes-root .field input, #implantacoes-root .field select, #implantacoes-root .field textarea {
  width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 9px;
  padding: 0 10px; background: var(--page); color: var(--text-primary);
  font-family: inherit; font-size: 13px;
}
#implantacoes-root .field textarea { height: auto; padding: 9px 10px; }
#implantacoes-root .field textarea { min-height: 62px; resize: vertical; }
#implantacoes-root .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#implantacoes-root .grid2 > .field.span2 { grid-column: 1 / -1; }
#implantacoes-root .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
#implantacoes-root .grid3 > .field.span3 { grid-column: 1 / -1; }
#implantacoes-root .grid3 > .field.span2 { grid-column: span 2; }
#implantacoes-root .grid2 > .field, #implantacoes-root .grid3 > .field { display: flex; flex-direction: column; }
#implantacoes-root .grid2 > .field > :not(label), #implantacoes-root .grid3 > .field > :not(label) { margin-top: auto; }
#implantacoes-root .grid2 > .field > .dica, #implantacoes-root .grid3 > .field > .dica { margin-top: 5px; }
#implantacoes-root .field .dica { font-size: 11px; color: var(--text-muted); margin-top: 5px; line-height: 1.45; }
#implantacoes-root .req-seg button { flex: 1; height: 38px; padding: 0 4px; text-align: center;
                  font-size: 11.5px; white-space: nowrap; }
#implantacoes-root .row2 { display: flex; gap: 9px; }
#implantacoes-root .row2 > .field { flex: 1; }
#implantacoes-root .ficha-blocos { display: flex; flex-direction: column; gap: 12px; }
#implantacoes-root .ff-grid {
  display: grid; grid-template-columns: 190px minmax(0,1fr);
  align-items: stretch; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface-1);
}
#implantacoes-root .ff-grid > * { display: flex; align-items: center; padding: 8px 10px;
               border-bottom: 1px solid var(--grid); min-width: 0; }
#implantacoes-root .ff-grid > .ff-fim { border-bottom: none; }
#implantacoes-root .ff-span2 { grid-column: 1 / -1; }
#implantacoes-root .ff-h { background: var(--page); font-size: 10px; text-transform: uppercase;
        letter-spacing: 0.02em; font-weight: 700; color: var(--text-muted); }
#implantacoes-root .ff-l { background: transparent; font-size: 12.5px; font-weight: 600;
        color: var(--text-secondary); line-height: 1.3; letter-spacing: -0.005em; }
#implantacoes-root .ff-v { gap: 8px; }
#implantacoes-root .ff-v.ff-col { flex-direction: column; align-items: stretch; gap: 6px; }
#implantacoes-root .ff-v input:not([type="checkbox"]), #implantacoes-root .ff-v select, #implantacoes-root .ff-v textarea {
  width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--page); color: var(--text-primary); font-family: inherit;
  font-size: 12.5px; padding: 0 8px;
}
#implantacoes-root .ff-v textarea { height: auto; min-height: 58px; padding: 7px 8px; resize: vertical; }
#implantacoes-root .ff-v .req-seg { margin-top: 0; width: 100%; }
#implantacoes-root .ff-v .req-item input[type="checkbox"] { width: 16px; height: 16px; }
#implantacoes-root .ff-v .req-seg button { height: 32px; font-size: 11.5px; }
#implantacoes-root .ff-v .dica { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
#implantacoes-root .et-bloco { display: flex; flex-direction: column; gap: 12px; }
#implantacoes-root .et-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 172px 82px 122px; align-items: stretch;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--surface-1);
}
#implantacoes-root .et-grid > * { padding: 8px 8px; border-bottom: 1px solid var(--grid); min-width: 0;
                display: flex; align-items: center; }
#implantacoes-root .et-grid > .et-nm { padding-left: 10px; }
#implantacoes-root .et-grid > :nth-last-child(-n+4) { border-bottom: none; }
#implantacoes-root .et-grid-impl { grid-template-columns: minmax(0,1fr) 172px 82px 122px 56px; }
#implantacoes-root .et-grid-impl > :nth-last-child(-n+5) { border-bottom: none; }
#implantacoes-root .et-toggle { grid-column: 1 / -1; padding: 8px 10px; gap: 8px;
             border-bottom: 1px solid var(--grid); background: var(--page); }
#implantacoes-root .et-toggle .seg { display: inline-flex; }
#implantacoes-root .et-grid .et-h {
  background: var(--page); font-size: 10px; text-transform: uppercase; letter-spacing: 0.02em;
  font-weight: 700; color: var(--text-muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
#implantacoes-root .et-grid .et-cc { justify-content: center; }
#implantacoes-root .et-nm { display: flex; align-items: center; gap: 9px; }
#implantacoes-root .et-nm .d { width: 10px; height: 10px; border-radius: 3px; flex: none; }
#implantacoes-root .et-nm .t { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.25; padding: 1px 0; }
#implantacoes-root .et-nm .when { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); }
#implantacoes-root .et-aplica, #implantacoes-root .ff-v .et-aplica {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; margin-top: 3px;
}
#implantacoes-root .et-aplica input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--good); cursor: pointer; }
#implantacoes-root .et-c { display: flex; justify-content: center; }
#implantacoes-root .et-c input[type="number"], #implantacoes-root .et-c input[type="date"] {
  width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--page); color: var(--text-primary); font-family: inherit; font-size: 12px;
  padding: 0 6px;
}
#implantacoes-root .et-c input[type="number"] { text-align: center; }
#implantacoes-root .et-c input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--good); cursor: pointer; }
#implantacoes-root .et-c .resp-pick { width: 100%; }

/* seletor de responsáveis: botão + painel de checkboxes (mesmo estilo do
   seletor de Posto de trabalho no Cadastro de Equipe) */
#implantacoes-root .resp-pick { position: relative; }
#implantacoes-root .resp-btn {
  width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--page); color: var(--text-primary); font-family: inherit; font-size: 12px;
  padding: 0 8px; text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#implantacoes-root .etapa-edit .resp-btn { font-size: 11.5px; padding: 0 7px; }
#implantacoes-root .resp-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 40;
  min-width: 280px; max-height: 220px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-hover); padding: 6px;
}
#implantacoes-root .resp-opt {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px;
  font-size: 12.5px; color: var(--text-primary); cursor: pointer; white-space: nowrap;
}
#implantacoes-root .sys-lista { display: flex; flex-wrap: wrap; gap: 2px 16px; }
#implantacoes-root .resp-opt:hover { background: var(--page); }
#implantacoes-root .resp-opt input { width: 15px; height: 15px; accent-color: var(--good); cursor: pointer; flex: none; }
#implantacoes-root .etapa-edit { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--grid); }
#implantacoes-root .etapa-edit:last-child { border-bottom: none; }
#implantacoes-root .etapa-edit .d { width: 11px; height: 11px; border-radius: 3px; flex: none; }
#implantacoes-root .etapa-edit .nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
#implantacoes-root .etapa-edit .when { font-size: 11px; color: var(--text-muted); }
#implantacoes-root .etapa-edit .feita { display: flex; align-items: center; gap: 5px; flex: none;
                     font-size: 11.5px; color: var(--text-secondary); white-space: nowrap;
                     cursor: pointer; }
#implantacoes-root .etapa-edit .feita input { width: auto; accent-color: var(--good); }
#implantacoes-root .etapa-edit input[type="number"] { width: 58px; flex: none; border: 1px solid var(--border);
       border-radius: 8px; padding: 6px 6px; background: var(--page); text-align: center; }
#implantacoes-root .etapa-edit select.resp { width: 150px; flex: none; font-size: 11.5px; padding: 6px 7px;
       border: 1px solid var(--border); border-radius: 8px; background: var(--page);
       color: var(--text-primary); }
#implantacoes-root .acts { display: flex; gap: 9px; margin-top: 20px; align-items: center; }
#implantacoes-root .et-ponto { display: inline-block; width: 11px; height: 11px; border-radius: 3px;
            margin-right: 8px; vertical-align: middle; }
#implantacoes-root .et-per { font-size: 12.5px; color: var(--text-secondary); }
#implantacoes-root .et-feita { display: flex; align-items: center; gap: 9px; font-size: 12.5px;
            color: var(--text-secondary); cursor: pointer; }
#implantacoes-root .et-feita input { width: 16px; height: 16px; flex: none; accent-color: var(--good); margin: 0; }
#implantacoes-root .cfg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--grid); }
#implantacoes-root .cfg-row:last-child { border-bottom: none; }
#implantacoes-root .cfg-row .d { width: 13px; height: 13px; border-radius: 50%; flex: none; }
#implantacoes-root .cfg-row .code { font-size: 11px; font-weight: 700; color: var(--text-muted); width: 32px; }
#implantacoes-root .cfg-row input { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; background: var(--page); }
#implantacoes-root .ck-wrap { align-items: center; justify-content: center; padding: 22px; }
#implantacoes-root .ck-visor {
  width: 1180px; max-width: 100%; height: 100%; max-height: 92vh;
  background: var(--surface-1); border-radius: 14px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; overflow: hidden;
}
#implantacoes-root .ck-topo {
  display: flex; align-items: center; gap: 9px; padding: 11px 14px;
  border-bottom: 1px solid var(--border); font-size: 13.5px;
}
#implantacoes-root #ckFrame { flex: 1; min-width: 0; border: 0; background: #f2f2f0; }
#implantacoes-root .toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--text-primary); color: var(--surface-1); padding: 11px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md); z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
#implantacoes-root .toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }
