/* ═══════════════════════════════════════════════════════
   MCO CONTÁBIL — Sistema Unificado
   Paleta: Azul #1a56db | Fontes: Sora + DM Sans
   Telas: Login → Hub → Dashboard (arquivo único)
═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --g:    #2563eb;
  --gl:   #eff6ff;
  --b:    #1d4ed8;
  --bg:   #f8fafc;
  --sf:   #ffffff;
  --sf2:  #f0f4ff;
  --bd:   #e2e8f0;
  --bd2:  #cbd5e1;
  --tx:   #0f172a;
  --tx2:  #475569;
  --tx3:  #94a3b8;
  --ra:   8px;
  --ral:  12px;
  /* Hub extras */
  --hub-sidebar-w: 300px;
  --hub-dark:      #0c1e4a;
  --hub-glow:      rgba(37,99,235,.2);
}

html { height: 100%; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--tx);
  font-size: 14px;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ── Controle de telas ──────────────────────── */
#loginScreen { display: flex; }
#hubScreen   { display: none; }
#dashScreen  { display: none; }

/* ════════════════════════════════════════════
   TELA 1 — LOGIN (Split institucional + form)
════════════════════════════════════════════ */
.login-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: row;
  background: #F8FAFC;
  overflow: hidden;
}

/* ── Painel institucional (esquerda 55%) ── */
.login-aside {
  position: relative;
  flex: 0 0 55%;
  max-width: 55%;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(135deg, #071B4D 0%, #0F3FA8 55%, #1E50C7 100%);
  color: #fff;
  display: flex;
  overflow: hidden;
  isolation: isolate;
}
.login-aside-bg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.login-aside-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .55;
}
.login-aside-blob-1 {
  width: 520px; height: 520px;
  top: -120px; left: -120px;
  background: radial-gradient(circle, #2563EB 0%, transparent 65%);
}
.login-aside-blob-2 {
  width: 460px; height: 460px;
  bottom: -140px; right: -100px;
  background: radial-gradient(circle, #3B82F6 0%, transparent 65%);
  opacity: .45;
}
.login-aside-blob-3 {
  width: 320px; height: 320px;
  top: 40%; left: 40%;
  background: radial-gradient(circle, rgba(96,165,250,.5) 0%, transparent 70%);
  opacity: .35;
}
.login-aside-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: .8;
}

.login-aside-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 56px 64px;
  max-width: 720px;
  margin: 0 auto;
}

.login-aside-brand {
  display: flex; align-items: center;
}
.login-aside-brand-logo {
  height: 56px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.login-aside-body {
  margin: 48px 0;
}
.login-aside-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2.4px; text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 22px;
}
.login-aside-title {
  font-family: 'Sora', sans-serif;
  font-size: 42px; line-height: 1.12; font-weight: 600;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 20px;
  max-width: 560px;
}
.login-aside-lead {
  font-size: 15px; line-height: 1.65;
  color: rgba(255,255,255,.78);
  max-width: 520px;
  margin-bottom: 36px;
}

.login-aside-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
  max-width: 460px;
}
.login-aside-features li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .2s, transform .2s, border-color .2s;
}
.login-aside-features li:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
  transform: translateX(2px);
}
.login-aside-features-icon {
  flex: 0 0 36px; height: 36px;
  border-radius: 10px;
  background: rgba(96,165,250,.22);
  border: 1px solid rgba(147,197,253,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #cfe1ff;
}
.login-aside-features-text {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.92);
}

.login-aside-foot {
  font-size: 11px; color: rgba(255,255,255,.5);
  letter-spacing: .3px;
}

/* ── Coluna do formulário (direita 45%) ── */
.login-form-col {
  flex: 1 1 45%;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 28px;
  min-height: 100vh;
  min-height: 100dvh;
  background: #F8FAFC;
  overflow-y: auto;
}

.login-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 24px;
  padding: 44px 40px;
  width: 100%; max-width: 440px;
  text-align: center;
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 12px 32px rgba(15,23,42,.06),
    0 32px 80px rgba(15,23,42,.05);
  animation: cardIn .4s ease;
  box-sizing: border-box;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-logo-wrap {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.login-logo-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #071B4D, #1a56db);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Sora', sans-serif;
  font-size: 18px; font-weight: 700;
  box-shadow: 0 6px 20px var(--hub-glow);
}
.login-brand-name {
  font-family: 'Sora', sans-serif;
  font-size: 20px; font-weight: 700; color: #0f172a; line-height: 1.15;
  text-align: center;
  letter-spacing: -.3px;
}
.login-brand-sub {
  font-size: 12px; color: #64748b; text-align: center;
  margin-top: 4px;
}
.login-title {
  font-family: 'Sora', sans-serif;
  font-size: 24px; font-weight: 700; color: var(--tx); margin-bottom: 8px;
  letter-spacing: -.4px;
}
.login-sub { font-size: 13px; color: #64748b; margin-bottom: 28px; line-height: 1.6; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 20px;
  border: 1.5px solid #e2e8f7; border-radius: 10px;
  background: #fff; color: #334155;
  font-size: 14px; font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; transition: all .15s;
}
.google-btn:hover {
  background: var(--gl); border-color: var(--g);
  box-shadow: 0 4px 16px var(--hub-glow);
}
.login-error {
  display: none; width: 100%; box-sizing: border-box;
  padding: 10px 14px; border-radius: 8px; font-size: 12px;
  font-weight: 600; text-align: center;
  background: #FEE2E2; color: #991B1B;
}
.login-error.show { display: block; }
.login-error.show { display: block; }
.login-info {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #F1F5F9;
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.6;
}

/* ── Responsivo: tablet/mobile ── */
@media (max-width: 1024px) {
  .login-screen { flex-direction: column; }
  .login-aside,
  .login-form-col { flex: 0 0 auto; max-width: 100%; width: 100%; min-height: 0; }
  .login-form-col {
    order: 1;
    padding: 36px 20px 24px;
    min-height: auto;
  }
  .login-aside {
    order: 2;
    min-height: auto;
    padding: 0;
  }
  .login-aside-inner {
    padding: 36px 28px;
    max-width: 100%;
  }
  .login-aside-body { margin: 28px 0; }
  .login-aside-title { font-size: 28px; max-width: 100%; }
  .login-aside-lead { font-size: 14px; max-width: 100%; margin-bottom: 24px; }
  .login-aside-eyebrow { margin-bottom: 14px; }
  .login-aside-features { max-width: 100%; }
}
@media (max-width: 640px) {
  .login-aside { display: none; }
  .login-form-col {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    background: linear-gradient(180deg, #F8FAFC 0%, #EEF2FF 100%);
  }
  .login-card { padding: 32px 24px; border-radius: 20px; }
  .login-title { font-size: 22px; }
}

/* ════════════════════════════════════════════
   TELA 2 — HUB
════════════════════════════════════════════ */
#hubScreen {
  height: 100vh; height: 100dvh;
  flex-direction: row; overflow: hidden;
}

/* Sidebar do hub */
.hub-sidebar {
  width: var(--hub-sidebar-w); min-width: var(--hub-sidebar-w);
  background: linear-gradient(180deg, #0e1b3d 0%, var(--hub-dark) 40%, #0a1530 100%);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden; z-index: 1;
  transition: width .25s cubic-bezier(.4,0,.2,1), min-width .25s cubic-bezier(.4,0,.2,1);
}
.hub-sidebar::before,
.hub-sidebar::after { display: none; }
.hub-brand {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: center;
  position: relative;
}
.hub-sidebar-close {
  display: none; position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.1); border: none; cursor: pointer;
  color: rgba(255,255,255,.7); font-size: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  align-items: center; justify-content: center;
  transition: all .15s; z-index: 1;
}
.hub-sidebar-close:hover { background: rgba(255,255,255,.18); color: #fff; }
.hub-brand-logo-wrap {
  display: flex; justify-content: center; margin-bottom: 6px;
}
.hub-brand-logo-img {
  height: 32px; width: auto; object-fit: contain;
  filter: brightness(1);
}

/* ── Sidebar collapse (web) ──────────────────────────── */
.hub-collapse-btn {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10px 16px; cursor: pointer; background: none; border: none;
  width: 100%;
  transition: background .15s; border-bottom: 1px solid rgba(255,255,255,.06);
}
.hub-collapse-btn:hover { background: rgba(255,255,255,.04); }
.hub-collapse-btn .cb-icon {
  display: flex; flex-direction: column; gap: 3.5px;
  width: 18px; transition: opacity .2s;
}
.hub-collapse-btn .cb-bar {
  display: block; width: 100%; height: 2px;
  background: rgba(255,255,255,.7); border-radius: 2px;
  transition: background .15s;
}
.hub-collapse-btn:hover .cb-bar { background: #fff; }

.hub-sidebar.collapsed { width: 56px; min-width: 56px; }
.hub-sidebar.collapsed .hub-brand-logo-img { height: 24px; }
.hub-sidebar.collapsed .hub-brand-sub,
.hub-sidebar.collapsed .hub-brand-name,
.hub-sidebar.collapsed .hub-nav-name,
.hub-sidebar.collapsed .hub-nav-desc,
.hub-sidebar.collapsed .hub-nav-label,
.hub-sidebar.collapsed .hub-badge-int,
.hub-sidebar.collapsed .hub-nav-ext,
.hub-sidebar.collapsed .hub-user-meta,
.hub-sidebar.collapsed .hub-logout-btn { display: none !important; }
.hub-sidebar.collapsed .hub-brand-row { justify-content: center; }
.hub-sidebar.collapsed .hub-brand     { padding: 16px 0; }
.hub-sidebar.collapsed .hub-nav-link  { justify-content: center; padding: 11px 0; }
.hub-sidebar.collapsed .hub-nav-icon  { margin: 0; font-size: 20px; }
.hub-sidebar.collapsed .hub-collapse-btn { justify-content: center; }
.hub-sidebar.collapsed .hub-collapse-btn .cb-icon { opacity: .7; }
.hub-sidebar.collapsed .hub-nav       { padding: 8px 0; }
.hub-sidebar.collapsed .hub-footer    { padding: 12px 0; }
.hub-sidebar.collapsed .hub-user-row  { justify-content: center; }
.hub-sidebar.collapsed .hub-user-av   { margin: 0; }
/* Tooltip no collapsed para mostrar nome ao hover */
.hub-sidebar.collapsed .hub-nav-link  { position: relative; }
.hub-sidebar.collapsed .hub-nav-link:hover::after {
  content: attr(data-tip);
  position: absolute; left: 60px; top: 50%; transform: translateY(-50%);
  background: #1e2d3d; color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  pointer-events: none; z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.hub-brand-row { display: flex; align-items: center; gap: 10px; }
.hub-brand-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Sora', sans-serif;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(37,99,235,.4); flex-shrink: 0;
}
.hub-brand-name {
  font-family: 'Sora', sans-serif;
  font-size: 14px; font-weight: 600; color: #fff;
}
.hub-brand-sub { font-size: 10px; color: rgba(255,255,255,.45); }

/* Nav do hub */
.hub-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.hub-nav::-webkit-scrollbar { width: 0; }
.hub-nav-group { padding: 16px 0 4px; }
.hub-nav-label {
  font-size: 9.5px; font-weight: 600;
  color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .1em;
  padding: 0 20px 6px;
}
.hub-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,.78);
  text-decoration: none; font-size: 13px;
  border-left: 2.5px solid transparent;
  transition: all .15s; cursor: pointer;
}
.hub-nav-link:hover {
  color: #fff; background: rgba(255,255,255,.08);
  border-left-color: #60a5fa;
}
.hub-nav-link.internal {
  color: #fff; font-weight: 500;
  background: rgba(37,99,235,.28);
  border-left-color: #60a5fa;
}
.hub-nav-link.internal:hover { background: rgba(37,99,235,.4); }
.hub-nav-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px;
  background: rgba(255,255,255,.07);
}
.hub-nav-link.internal .hub-nav-icon { background: rgba(37,99,235,.4); }
.hub-nav-link:hover .hub-nav-icon { background: rgba(255,255,255,.14); }
.hub-nav-info { flex: 1; min-width: 0; }
.hub-nav-name { font-size: 12.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-nav-desc { font-size: 10px; color: rgba(255,255,255,.4); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-nav-ext { font-size: 9px; color: rgba(255,255,255,.25); flex-shrink: 0; }
.hub-badge-int {
  font-size: 8.5px; font-weight: 700; padding: 2px 7px;
  background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff;
  border-radius: 10px; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(37,99,235,.3);
}

/* ── Departamento Accordion na Sidebar Azul ──────────── */
.hub-dept-group { padding: 2px 0; border-left: 2.5px solid transparent; transition: border-color .15s; }
.hub-dept-group:has(.hub-dept-toggle.open) { border-left-color: rgba(96,165,250,.4); }
.hub-dept-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; width: 100%;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.85); font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  font-family: 'DM Sans', sans-serif;
  transition: color .15s, background .15s; text-align: left;
}
.hub-dept-toggle:hover { color: #fff; background: rgba(255,255,255,.05); }
.hub-dept-toggle.open { color: #fff; }
.hub-dept-toggle-icon {
  font-size: 14px; flex-shrink: 0; opacity: .9;
  font-style: normal;
}
.hub-dept-toggle-label { flex: 1; min-width: 0; }
.hub-dept-toggle-arrow {
  font-size: 10px; flex-shrink: 0;
  transition: transform .2s ease; display: inline-block;
  font-style: normal; opacity: .6;
}
.hub-dept-toggle.open .hub-dept-toggle-arrow { transform: rotate(90deg); opacity: 1; }
.hub-dept-toggle-count {
  font-size: 8px; background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.4); padding: 1px 6px;
  border-radius: 8px; flex-shrink: 0; font-weight: 700;
}
.hub-dept-toggle.open .hub-dept-toggle-count {
  background: rgba(96,165,250,.25); color: rgba(255,255,255,.8);
}
.hub-dept-items {
  max-height: 0; overflow: hidden;
  transition: max-height .25s cubic-bezier(.4,0,.2,1);
}
.hub-dept-items.open { max-height: 1200px; }

/*
 * Sublinks: MESMO estilo visual do .hub-nav-link
 * Reseta qualquer herança de .hub-card para ficar idêntico ao nav
 */
.hub-dept-sublink.hub-card {
  /* Reset completo do .hub-card — sem card branco, sem borda, sem sombra */
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  transform: none !important;
  overflow: visible !important;
  position: static !important;
  flex-direction: row !important;
  gap: 0 !important;
  /* Aplicar o estilo de .hub-nav-link */
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px 8px 44px !important;
  color: rgba(255,255,255,.75);
  text-decoration: none; font-size: 12px;
  border-left: 2.5px solid transparent !important;
  transition: all .15s; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.hub-dept-sublink.hub-card::before { display: none !important; }
.hub-dept-sublink.hub-card:hover {
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
  border-left-color: #60a5fa !important;
  transform: none !important;
  box-shadow: none !important;
}
.hub-dept-sublink.hub-card .hub-card-icon,
.hub-dept-sublink.hub-card .hub-card-desc,
.hub-dept-sublink.hub-card .hub-card-action,
.hub-dept-sublink.hub-card .hub-card-name { display: none !important; }
.hub-dept-sublink.hub-card .perm-lock {
  position: static !important; width: auto !important; height: auto !important;
  background: none !important; border-radius: 0 !important;
  font-size: 10px !important; margin-left: 4px;
}

.hub-dept-sublink-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.7); flex-shrink: 0;
  transition: all .15s; margin-right: 4px;
}
.hub-dept-sublink.hub-card:hover .hub-dept-sublink-dot {
  background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.3);
}
.hub-dept-sublink-name {
  flex: 1; min-width: 0;
  font-size: 12px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hub-dept-sublink-ext {
  font-size: 9px; color: rgba(255,255,255,.3); flex-shrink: 0;
}

/* Busca rápida na sidebar */
.hub-sidebar-search {
  padding: 8px 16px 6px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.hub-sidebar-search-input {
  width: 100%; padding: 7px 10px 7px 28px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 6px;
  background: rgba(255,255,255,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 8px center no-repeat;
  font-size: 11px; font-family: inherit;
  color: rgba(255,255,255,.8); outline: none;
  transition: border-color .15s;
}
.hub-sidebar-search-input::placeholder { color: rgba(255,255,255,.3); }
.hub-sidebar-search-input:focus { border-color: rgba(96,165,250,.5); background: rgba(255,255,255,.1); }
/* Collapsed sidebar: hide accordion details */
.hub-sidebar.collapsed .hub-dept-toggle-label,
.hub-sidebar.collapsed .hub-dept-toggle-arrow,
.hub-sidebar.collapsed .hub-dept-toggle-count,
.hub-sidebar.collapsed .hub-dept-items,
.hub-sidebar.collapsed .hub-sidebar-search { display: none !important; }
.hub-sidebar.collapsed .hub-dept-toggle { justify-content: center; padding: 10px 0; position: relative; }
.hub-sidebar.collapsed .hub-dept-toggle-icon { margin: 0; opacity: 1; }
.hub-sidebar.collapsed .hub-dept-toggle:hover::after {
  content: attr(data-tip);
  position: absolute; left: 60px; top: 50%; transform: translateY(-50%);
  background: #1e2d3d; color: #fff; font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  pointer-events: none; z-index: 999; text-transform: none; letter-spacing: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

/* Footer do hub */
.hub-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.hub-user-row { display: flex; align-items: center; gap: 9px; }
.hub-user-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.hub-user-av img { width: 100%; height: 100%; object-fit: cover; }
.hub-user-meta { flex: 1; min-width: 0; }
.hub-user-name { font-size: 12px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-user-email { font-size: 10px; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-logout-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.35); font-size: 13px;
  padding: 4px; border-radius: 6px; flex-shrink: 0; transition: all .1s;
}
.hub-logout-btn:hover { color: #f87171; background: rgba(248,113,113,.12); }

/* Main do hub */
.hub-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.hub-topbar {
  background: #fff; border-bottom: 1px solid #e2e8f0;
  padding: 12px 32px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.hub-mob-btn {
  display: none; background: none; border: none;
  cursor: pointer; font-size: 20px; color: var(--tx3);
  padding: 4px; border-radius: 6px;
}
.hub-mob-btn:hover { background: var(--gl); color: var(--g); }
.hub-greeting-hi { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 600; color: var(--tx); }
.hub-greeting-sub { font-size: 11px; color: var(--tx3); }
.hub-clock {
  font-size: 11px; color: #475569; font-weight: 500;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  padding: 5px 12px; border-radius: 20px;
  font-variant-numeric: tabular-nums;
}
.hub-content { flex: 1; overflow-y: auto; padding: 32px 32px 28px; -webkit-overflow-scrolling: touch; background: #f8fafc; }

/* ── Cards de KPI no topo do Hub ─────────────────────────── */
.hub-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.hub-kpi {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 14px; padding: 16px 18px;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative;
  min-width: 0;
}
.hub-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15,23,42,.06);
  border-color: #cbd5e1;
}
.hub-kpi-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.hub-kpi-body { flex: 1; min-width: 0; }
.hub-kpi-label {
  font-size: 12px; color: #64748b; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hub-kpi-value {
  font-size: 26px; font-weight: 700; color: #0f172a;
  line-height: 1.15; font-variant-numeric: tabular-nums;
  font-family: 'Sora', system-ui, sans-serif;
  margin-top: 2px;
}
.hub-kpi-value.loading { color: #cbd5e1; font-weight: 500; font-size: 18px; }
.hub-kpi-sub {
  font-size: 11.5px; font-weight: 600;
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hub-kpi-arrow {
  color: #cbd5e1; font-size: 18px; flex-shrink: 0;
  transition: transform .15s, color .15s;
}
.hub-kpi:hover .hub-kpi-arrow { color: #64748b; transform: translateX(2px); }

@media (max-width: 1100px) {
  .hub-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hub-kpis { grid-template-columns: 1fr; }
  .hub-kpi-value { font-size: 22px; }
}

/* ── Atalhos rápidos (card branco igual ao mockup) ─────── */
/* Temporariamente oculto enquanto ajustamos o dashboard. */
.hub-footer .hub-atalhos { display: none; }
.hub-footer .hub-atalhos.__rev {
  background: #fff;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 14px 14px 10px;
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.hub-footer .hub-atalhos-label {
  font-size: 11.5px; font-weight: 500; color: #94a3b8;
  margin-bottom: 6px;
  padding: 0 2px;
}
.hub-footer .hub-atalho-item {
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: 0; padding: 9px 6px;
  font-size: 13.5px; color: #0f172a; font-weight: 500;
  font-family: inherit; cursor: pointer; text-align: left;
  border-radius: 8px; width: 100%;
  transition: background .15s;
}
.hub-footer .hub-atalho-item:hover { background: #f8fafc; }
.hub-footer .hub-atalho-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  background: #eff6ff;
  color: #2563eb;
}
.hub-footer .hub-atalho-text { flex: 1; line-height: 1.2; }

/* ── Modais dos atalhos (Compromisso / Atendimento) ─────── */
.atalho-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(8,14,35,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.atalho-overlay.open { display: flex; }
.atalho-modal {
  background: #fff; border-radius: 16px;
  width: 540px; max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(2,8,30,.3);
  overflow: hidden;
}
.atalho-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px; border-bottom: 1px solid #f1f5f9;
}
.atalho-head h3 {
  margin: 0; font-size: 15px; font-weight: 700; color: #0f172a;
  display: flex; align-items: center; gap: 8px;
}
.atalho-head h3 i { font-size: 18px; }
.atalho-close {
  background: #f1f5f9; border: 1px solid #e2e8f0;
  width: 32px; height: 32px; border-radius: 8px;
  cursor: pointer; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.atalho-body {
  padding: 18px 22px; overflow-y: auto;
}
.atalho-body label {
  display: block; font-size: 11px; font-weight: 700;
  color: #475569; text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 5px; margin-top: 12px;
}
.atalho-body label:first-child { margin-top: 0; }
.atalho-body input[type=text],
.atalho-body input[type=datetime-local],
.atalho-body textarea,
.atalho-body select {
  width: 100%; box-sizing: border-box;
  border: 1px solid #e2e8f0; border-radius: 9px;
  padding: 9px 12px; font-size: 13.5px;
  font-family: inherit; color: #0f172a;
  outline: none; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.atalho-body input:focus,
.atalho-body textarea:focus,
.atalho-body select:focus {
  border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.atalho-body textarea { resize: vertical; min-height: 70px; }
.atend-sug-list {
  border: 1px solid #e2e8f0; border-top: 0;
  border-radius: 0 0 9px 9px;
  margin-top: -8px;
  max-height: 180px; overflow-y: auto;
  background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.atend-sug-item {
  padding: 8px 12px; font-size: 12.5px; cursor: pointer;
  border-bottom: 1px solid #f1f5f9; color: #0f172a;
}
.atend-sug-item:last-child { border-bottom: 0; }
.atend-sug-item:hover { background: #f8fafc; }
.atend-sug-item small { color: #94a3b8; font-size: 10.5px; display: block; margin-top: 2px; }
.atalho-foot {
  padding: 14px 22px; border-top: 1px solid #f1f5f9;
  display: flex; gap: 10px; justify-content: flex-end;
  background: #f8fafc;
}
.atalho-btn-ghost {
  background: #fff; border: 1px solid #e2e8f0;
  color: #475569; font-weight: 600; font-size: 13px;
  padding: 9px 18px; border-radius: 9px;
  cursor: pointer; font-family: inherit;
}
.atalho-btn-ghost:hover { background: #f1f5f9; }
.atalho-btn-primary {
  background: linear-gradient(135deg,#2563eb,#1d4ed8);
  color: #fff; border: 0; font-weight: 600; font-size: 13px;
  padding: 9px 18px; border-radius: 9px;
  cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 12px rgba(37,99,235,.22);
}
.atalho-btn-primary:hover { filter: brightness(1.05); }
.atalho-btn-primary:disabled {
  opacity: .65; cursor: not-allowed;
  background: #94a3b8; box-shadow: none;
}
.atalho-msg {
  margin: 0 22px 14px; padding: 9px 12px;
  border-radius: 9px; font-size: 12.5px; font-weight: 500;
}
.atalho-msg.ok  { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.atalho-msg.err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Grid principal: Pendências + Agenda + Notícias ────── */
.hub-grid-3col {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.1fr;
  gap: 18px;
  margin-bottom: 16px;
  align-items: stretch;
}
.hub-grid-3col > * { margin-bottom: 0 !important; min-width: 0; }
.hub-grid-3col .pend-card,
.hub-grid-3col .agenda-card,
.hub-grid-3col .news-card { display: flex; flex-direction: column; }
.hub-grid-3col .pend-body,
.hub-grid-3col .agenda-body,
.hub-grid-3col .news-body { flex: 1; }
.hub-grid-3col .pend-body {
  max-height: 360px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.hub-grid-3col .pend-body::-webkit-scrollbar { width: 4px; }
.hub-grid-3col .pend-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.hub-grid-3col .news-body {
  max-height: 360px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.hub-grid-3col .news-body::-webkit-scrollbar { width: 4px; }
.hub-grid-3col .news-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.hub-grid-3col .agenda-body {
  max-height: 360px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.hub-grid-3col .agenda-body::-webkit-scrollbar { width: 4px; }
.hub-grid-3col .agenda-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* ── Card de Pendências Prioritárias ────────────────────── */
.pend-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  overflow: hidden;
}
.pend-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.pend-hd-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #0f172a;
}
.pend-hd-title i { color: #2563eb; font-size: 17px; }
.pend-hd-count {
  background: #fee2e2; color: #b91c1c;
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.pend-hd-link {
  font-size: 12px; color: #2563eb; font-weight: 600;
  text-decoration: none;
}
.pend-hd-link:hover { text-decoration: underline; }
.pend-body { padding: 4px 4px; }
.pend-loading {
  display: flex; align-items: center; gap: 6px;
  padding: 22px 16px; color: #94a3b8; font-size: 12.5px;
}
.pend-loading-dot {
  width: 5px; height: 5px; border-radius: 50%; background: #cbd5e1;
  animation: pendDot 1.2s infinite ease-in-out;
}
.pend-loading-dot:nth-child(2) { animation-delay: .15s; }
.pend-loading-dot:nth-child(3) { animation-delay: .3s; }
@keyframes pendDot { 0%,80%,100% { opacity:.3 } 40% { opacity:1 } }

.pend-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px; align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.pend-item:last-child { border-bottom: 0; }
.pend-item:hover { background: #f8fafc; }
.pend-item-main { min-width: 0; }
.pend-item-row1 {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 3px;
}
.pend-item-badge {
  font-size: 9.5px; font-weight: 700; padding: 2px 7px;
  border-radius: 999px; text-transform: none; letter-spacing: 0;
  flex-shrink: 0;
}
.pend-item-badge.alta { background:#fee2e2; color:#b91c1c; }
.pend-item-badge.media { background:#fef3c7; color:#92400e; }
.pend-item-badge.baixa { background:#dbeafe; color:#1d4ed8; }
.pend-item-titulo {
  font-size: 13px; font-weight: 600; color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pend-item-empresa {
  font-size: 11.5px; color: #64748b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pend-item-prazo {
  text-align: right; flex-shrink: 0;
}
.pend-item-prazo-label {
  font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pend-item-prazo-label.alta { color: #dc2626; }
.pend-item-prazo-label.media { color: #ca8a04; }
.pend-item-prazo-label.baixa { color: #475569; }
.pend-item-prazo-data {
  font-size: 10.5px; color: #94a3b8;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.pend-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
  padding: 30px 16px; text-align: center;
  color: #94a3b8; font-size: 12.5px;
}
.pend-empty i { font-size: 28px; color: #16a34a; }
.pend-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-top: 1px solid #f1f5f9; background: #f8fafc;
}
.pend-foot-link {
  font-size: 12px; color: #2563eb; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; gap: 2px;
}
.pend-foot-link:hover { text-decoration: underline; }

/* ── Grid 2 colunas para blocos centrais ──────────── */
.hub-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 16px;
  align-items: stretch;
}
.hub-grid-2col > * { margin-bottom: 0 !important; min-width: 0; }
/* Scroll interno nos blocos com muito conteúdo */
.hub-grid-2col .news-body {
  max-height: 360px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.hub-grid-2col .news-body::-webkit-scrollbar { width: 4px; }
.hub-grid-2col .news-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.hub-grid-2col .agenda-body {
  max-height: 360px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.hub-grid-2col .agenda-body::-webkit-scrollbar { width: 4px; }
.hub-grid-2col .agenda-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.hub-grid-2col .avisos-body {
  max-height: 320px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.hub-grid-2col .avisos-body::-webkit-scrollbar { width: 4px; }
.hub-grid-2col .avisos-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.hub-grid-2col .distrato-body {
  max-height: 320px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.hub-grid-2col .distrato-body::-webkit-scrollbar { width: 4px; }
.hub-grid-2col .distrato-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
/* Equalizar altura dos cards no grid */
.hub-grid-2col .news-card,
.hub-grid-2col .agenda-card,
.hub-grid-2col .avisos-card,
.hub-grid-2col .distrato-card {
  display: flex; flex-direction: column;
}
.hub-grid-2col .news-body,
.hub-grid-2col .agenda-body,
.hub-grid-2col .avisos-body,
.hub-grid-2col .distrato-body { flex: 1; }

/* Hero do hub */
.hub-hero {
  text-align: center; padding: 48px 24px 40px;
  animation: fadeUp .4s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hub-hero-logo {
  width: 80px; height: 80px; border-radius: 20px;
  background: linear-gradient(135deg, var(--hub-dark) 0%, var(--g) 60%, #3b82f6 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 16px 48px var(--hub-glow), 0 0 0 6px rgba(26,86,219,.08);
  font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800; color: #fff;
}
.hub-hero-title {
  font-family: 'Sora', sans-serif;
  font-size: 28px; font-weight: 700; color: var(--tx);
  margin-bottom: 8px; line-height: 1.2;
}
.hub-hero-title span { color: var(--g); }
.hub-hero-sub {
  font-size: 14px; color: var(--tx3);
  max-width: 460px; margin: 0 auto 28px; line-height: 1.7;
}
.hub-stats { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.hub-stat { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--tx3); }
.hub-stat-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.hub-stat-dot.blue { background: var(--g); }

/* Seções e cards do hub */
.hub-section { margin-bottom: 32px; animation: fadeUp .4s ease both; }
.hub-section:nth-child(2) { animation-delay: .08s; }
.hub-section:nth-child(3) { animation-delay: .16s; }
.hub-section:nth-child(4) { animation-delay: .24s; }
.hub-section-title {
  font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--tx2);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.hub-section-title::after { content: ''; flex: 1; height: 1px; background: var(--bd); }
.hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.hub-card {
  background: #fff; border: 1px solid var(--bd);
  border-radius: var(--ral); padding: 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; text-decoration: none; color: inherit;
  transition: all .18s; position: relative; overflow: hidden;
}
.hub-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--g), #3b82f6);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.hub-card:hover {
  border-color: var(--g); transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--hub-glow);
}
.hub-card:hover::before { transform: scaleX(1); }
.hub-card.featured {
  background: linear-gradient(135deg, var(--hub-dark) 0%, var(--g) 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 32px var(--hub-glow);
}
.hub-card.featured::before { display: none; }
.hub-card.featured:hover { transform: translateY(-3px); box-shadow: 0 16px 48px var(--hub-glow); }
.hub-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: var(--gl);
}
.hub-card.featured .hub-card-icon { background: rgba(255,255,255,.15); }
.hub-card-name { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 600; line-height: 1.2; }
.hub-card.featured .hub-card-name { color: #fff; }
.hub-card-desc { font-size: 11px; color: var(--tx3); line-height: 1.4; flex: 1; }
.hub-card.featured .hub-card-desc { color: rgba(255,255,255,.65); }
.hub-card-action { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; color: var(--g); margin-top: 4px; }
.hub-card.featured .hub-card-action { color: rgba(255,255,255,.8); }

/* ════════════════════════════════════════════
   TELA 3 — DASHBOARD
════════════════════════════════════════════ */
#dashScreen {
  height: 100vh; height: 100dvh;
  flex-direction: row; overflow: hidden;
}
.app { display: flex; height: 100%; overflow: hidden; }

/* Sidebar do dashboard */
.sidebar {
  width: 220px; min-width: 220px;
  background: var(--sf); border-right: 1px solid var(--bd);
  display: flex; flex-direction: column;
}
.brand { padding: 20px 18px 16px; border-bottom: 1px solid var(--bd); }
.blogo { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.bdot {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--g); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.bname { font-size: 13px; font-weight: 600; color: var(--tx); }
.bsub { font-size: 11px; color: var(--tx3); padding-left: 36px; }
.nav { padding: 10px 0; flex: 1; overflow-y: auto; }
.nsep {
  font-size: 10px; color: var(--tx3);
  padding: 10px 18px 4px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}
.ni {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; font-size: 13px; color: var(--tx2);
  cursor: pointer; border-left: 2px solid transparent;
}
.ni:hover { background: var(--sf2); color: var(--tx); }
.ni.active { color: var(--g); border-left-color: var(--g); background: var(--gl); font-weight: 500; }
.sfoot { padding: 14px 18px; border-top: 1px solid var(--bd); }
.spill { font-size: 11px; color: var(--tx3); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: #D1D5DB; flex-shrink: 0; transition: background .3s; }
.sdot.on { background: var(--g); }
.sdot.err { background: #DC2626; }
.sinfo { font-size: 10.5px; color: var(--tx3); line-height: 1.7; }
.sinfo span { display: block; }
.user-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--sf2); border-radius: var(--ra); margin-top: 8px;
}
.user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-avatar-fallback {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--g); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 11px; font-weight: 600; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email { font-size: 10px; color: var(--tx3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-btn { font-size: 10px; color: var(--tx3); background: none; border: none; cursor: pointer; padding: 2px 4px; border-radius: 4px; flex-shrink: 0; }
.logout-btn:hover { color: #DC2626; background: #FEF2F2; }

/* Main do dashboard */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; position: relative; }
.topbar {
  background: var(--sf); border-bottom: 1px solid var(--bd);
  padding: 12px 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.ptitle { font-size: 15px; font-weight: 600; color: var(--tx); }
.psub { font-size: 11px; color: var(--tx3); margin-top: 2px; }
.mob-menu-btn {
  display: none; background: none; border: none;
  cursor: pointer; padding: 6px; border-radius: var(--ra);
  color: var(--tx2); font-size: 20px; line-height: 1; flex-shrink: 0;
}
.mob-menu-btn:hover { background: var(--sf2); }
.back-hub-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--bd); border-radius: var(--ra);
  padding: 5px 12px; font-size: 12px; color: var(--tx2);
  cursor: pointer; font-family: inherit; transition: all .1s; white-space: nowrap;
}
.back-hub-btn:hover { background: var(--gl); color: var(--g); border-color: var(--g); }

/* Barra de sync */
.sync-status-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: var(--sf); border-bottom: 1px solid var(--bd);
  padding: 7px 20px; flex-wrap: wrap;
}
.sync-status-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sync-pill {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--tx2);
  background: var(--sf2); border: .5px solid var(--bd);
  border-radius: 20px; padding: 3px 10px; white-space: nowrap;
}
.sync-pill strong { color: var(--tx); }
.sync-pill.ok { border-color: var(--bd2); background: var(--gl); color: var(--b); }
.sync-pill.ok strong { color: var(--g); }
.sync-pill.warn { border-color: #FDE68A; background: #FFFBEB; color: #92400E; }
.sync-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--g);
  animation: pulse 2s ease-in-out infinite; flex-shrink: 0;
}
.sync-pulse.idle { background: #D1D5DB; animation: none; }
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.7); }
}
.sync-manbtn {
  font-size: 11px; padding: 4px 10px; border-radius: var(--ra);
  border: .5px solid var(--bd2); background: var(--sf);
  color: var(--tx2); cursor: pointer; white-space: nowrap; transition: all .1s;
}
.sync-manbtn:hover { background: var(--gl); color: var(--g); border-color: var(--g); }
.sync-manbtn:disabled { opacity: .5; cursor: not-allowed; }

/* Conteúdo do dashboard */
.content {
  flex: 1; overflow-y: auto; padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Barra de filtro de periodo */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-group {
  display: flex; align-items: center; gap: 6px;
  background: var(--sf2); border: .5px solid var(--bd);
  border-radius: var(--ra); padding: 5px 10px;
}
.filter-label { font-size: 11px; color: var(--tx2); font-weight: 500; white-space: nowrap; }
.date-input {
  font-size: 12px; padding: 3px 6px;
  border-radius: 5px; border: .5px solid var(--bd2);
  background: var(--sf); color: var(--tx); cursor: pointer; outline: none;
}
.date-input:focus { border-color: var(--g); }
.fbtn {
  font-size: 11px; padding: 5px 11px; border-radius: var(--ra);
  border: .5px solid var(--bd2); background: var(--sf);
  color: var(--tx2); cursor: pointer; font-weight: 500; white-space: nowrap; transition: all .12s;
}
.fbtn:hover { background: var(--sf2); }
.fbtn.primary { background: var(--g); color: #fff; border-color: var(--g); }
.fbtn.primary:hover { background: #1d4ed8; }
.fbtn.danger { color: #DC2626; border-color: #FECACA; }
.fbtn.danger:hover { background: #FEF2F2; }
.rbtn {
  background: var(--g); color: #fff; border: none;
  border-radius: var(--ra); padding: 7px 14px;
  font-size: 12px; cursor: pointer; font-weight: 600; white-space: nowrap;
}
.rbtn:hover { background: #1d4ed8; }
.rbtn:disabled { background: #9CA3AF; cursor: not-allowed; }

/* Layout cards */
.mrow  { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.mrow3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.mc { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--ral); padding: 16px 18px; }
.mcl { font-size: 11px; color: var(--tx2); margin-bottom: 6px; font-weight: 500; }
.mcv { font-size: 26px; font-weight: 700; color: var(--tx); line-height: 1; }
.mcs { font-size: 11px; color: var(--tx3); margin-top: 5px; }
.mc.g .mcv { color: var(--g); }
.mc.b .mcv { color: var(--b); }
.mc.ok .mcv { color: #059669; }
.mc.warn .mcv { color: #D97706; }
.mc.err .mcv { color: #DC2626; }
.g2  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.g3  { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
.gf  { margin-bottom: 14px; }

/* Cards */
.card { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--ral); padding: 18px; }
.ch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ct { font-size: 13px; font-weight: 600; color: var(--tx); }
.cb { font-size: 11px; color: var(--tx2); background: var(--sf2); padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.leg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.li { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--tx2); }
.lsq { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Tabelas */
table { width: 100%; border-collapse: collapse; font-size: 12px; }
/* Card que contem tabelas largas — nao cortar overflow */
.card-table { overflow: visible; }
.card-table .tow { border-radius: 0 0 var(--ral) var(--ral); }
th {
  text-align: left; padding: 8px 10px; color: var(--tx3);
  font-weight: 600; border-bottom: 1px solid var(--bd);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; background: var(--sf2);
}
td {
  padding: 8px 10px; color: var(--tx); border-bottom: 1px solid var(--bd);
  white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAFA; }
.tow {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  display: block;
  width: 100%;
}
/* Tabela dentro do .tow nunca comprime — rola horizontalmente */
.tow table {
  min-width: 900px;   /* largura minima para colunas visiveis */
  width: max-content; /* cresce conforme o conteudo */
  table-layout: auto;
}

/* Badges */
.bdg { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10.5px; font-weight: 600; }
.bsn { background: #D1FAE5; color: #065F46; }
.blp { background: #DBEAFE; color: #1a56db; }
.blr { background: #FEF3C7; color: #92400E; }
.bmei { background: #FFE4E6; color: #9F1239; }
.bot { background: var(--sf2); color: var(--tx2); }
.tok { background: #DBEAFE; color: #1a56db; }
.tno { background: #FEE2E2; color: #991B1B; }
.tvz { background: #FEF3C7; color: #92400E; }

/* Progress bars */
.pgb  { height: 5px; background: var(--sf2); border-radius: 3px; overflow: hidden; }
.pgf  { height: 100%; border-radius: 3px; }
.pgb8 { height: 8px; background: var(--sf2); border-radius: 4px; overflow: hidden; }
.pgf8 { height: 100%; border-radius: 4px; }

/* Miscelânea */
.fbar2 { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.fsel {
  font-size: 12px; padding: 6px 10px; border-radius: var(--ra);
  border: 1px solid var(--bd2); background: var(--sf); color: var(--tx); cursor: pointer;
}
.fsr {
  font-size: 12px; padding: 6px 10px; border-radius: var(--ra);
  border: 1px solid var(--bd2); background: var(--sf); color: var(--tx);
  flex: 1; min-width: 180px;
}
.fsr:focus, .fsel:focus { outline: none; border-color: var(--g); }
.mgrid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.mcell {
  background: var(--sf2); border-radius: var(--ra); padding: 10px 12px;
  border: 1px solid var(--bd); cursor: pointer;
}
.mcell:hover, .mcell.sel { background: var(--gl); border-color: var(--g); }
.mcell.zero { opacity: .4; }
.mnm { font-size: 10px; color: var(--tx2); margin-bottom: 4px; font-weight: 500; }
.mnum { font-size: 18px; font-weight: 700; color: var(--tx); }
.mcell.sel .mnum { color: var(--g); }
.mbar { height: 3px; background: var(--bd); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.mbf  { height: 100%; background: var(--g); border-radius: 2px; }
.nodata { text-align: center; padding: 40px; color: var(--tx3); font-size: 13px; }
.rno { font-size: 11px; color: var(--tx3); width: 32px; min-width: 32px; }
/* Primeira coluna da tabela de clientes sempre visivel */
.tow th:first-child,
.tow td:first-child { position: sticky; left: 0; background: var(--sf2); z-index: 1; }
.tow tr:hover td:first-child { background: #F1F5FF; }
.tup { color: #059669; font-size: 11px; font-weight: 600; }
.tdn { color: #DC2626; font-size: 11px; font-weight: 600; }
.dbg {
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: var(--ra);
  padding: 10px 14px; margin-bottom: 14px; font-size: 11.5px; color: #92400E; line-height: 1.7;
}
.sync-bar {
  background: var(--gl); border: 1px solid var(--bd2); border-radius: var(--ra);
  padding: 8px 14px; margin-bottom: 14px; font-size: 12px; color: var(--b);
  display: flex; align-items: center; gap: 8px;
}
.filter-active-bar {
  background: var(--gl); border: .5px solid var(--bd2); border-radius: var(--ra);
  padding: 7px 14px; margin-bottom: 12px; font-size: 11.5px; color: var(--g);
  display: flex; align-items: center; justify-content: space-between;
}
.hbar-wrap { display: flex; flex-direction: column; gap: 7px; }
.hbar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.hbar-lbl { width: 130px; flex-shrink: 0; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.hbar-track { flex: 1; height: 6px; background: var(--sf2); border-radius: 3px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 3px; }
.hbar-val { width: 28px; text-align: right; color: var(--tx2); flex-shrink: 0; font-size: 11px; }
.sect-title {
  font-size: 13px; font-weight: 600; color: var(--tx);
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; gap: 8px;
}
.col-tag { font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 20px; background: var(--sf2); color: var(--tx2); }
.vz-tag { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: #FEF3C7; color: #92400E; }
.pend-bar { display: flex; flex-direction: column; gap: 8px; }
.pend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }

/* Tributação drawer */
.tr-regime { cursor: pointer; user-select: none; transition: background .1s; }
.tr-regime:hover td { background: var(--gl); }
.tr-regime.is-open td { background: var(--gl); }
.tr-regime .arr {
  display: inline-block; font-size: 9px; color: var(--tx3);
  margin-right: 5px; transition: transform .18s; line-height: 1;
}
.tr-regime.is-open .arr { transform: rotate(90deg); color: var(--g); }
.tr-detail td { padding: 0 !important; border-bottom: 2px solid var(--g) !important; }
.tr-detail .detail-wrap { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.tr-detail.is-open .detail-wrap { max-height: 600px; overflow: hidden; }
.detail-inner-scroll {
  max-height: 520px; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
}
.detail-inner-scroll table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--sf2); box-shadow: 0 1px 0 var(--bd);
}

/* Colaboradores */
.colab-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 12px; margin-bottom: 16px; }
.colab-card { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--ral); padding: 16px; display: flex; align-items: center; gap: 12px; }
.colab-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--g); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.colab-info { flex: 1; min-width: 0; }
.colab-name { font-size: 13px; font-weight: 600; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colab-email { font-size: 11px; color: var(--tx3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colab-domain-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px; background: #DBEAFE; color: #1a56db; }
.colab-manual-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px; background: #DBEAFE; color: #1a56db; }
.colab-remove { background: none; border: none; cursor: pointer; color: var(--tx3); font-size: 14px; padding: 4px; border-radius: 6px; flex-shrink: 0; }
.colab-remove:hover { background: #FEF2F2; color: #DC2626; }
.colab-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.colab-input { flex: 1; min-width: 220px; font-size: 13px; padding: 8px 12px; border-radius: var(--ra); border: 1px solid var(--bd2); background: var(--sf); color: var(--tx); }
.colab-input:focus { outline: none; border-color: var(--g); }
.colab-add-btn { background: var(--g); color: #fff; border: none; border-radius: var(--ra); padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.colab-add-btn:hover { background: #1d4ed8; }

/* PDF btn */
.pdf-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #DC2626; color: #fff; border: none; border-radius: var(--ra);
  padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background .1s;
}
.pdf-btn:hover { background: #B91C1C; }

/* Loading overlay */
.lov { position: fixed; inset: 0; background: rgba(255,255,255,.93); display: flex; align-items: center; justify-content: center; z-index: 9998; }
.lov.hide { display: none; }
.lcard { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--ral); padding: 32px 40px; text-align: center; min-width: 300px; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.ltitle { font-size: 14px; font-weight: 600; color: var(--tx); margin-bottom: 4px; }
.lsub { font-size: 12px; color: var(--tx2); margin-bottom: 18px; }
.pbwrap { height: 6px; background: var(--sf2); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.pbfill { height: 100%; background: var(--g); border-radius: 3px; transition: width .25s; width: 0%; }
.pbpct { font-size: 11px; color: var(--tx3); }

/* Overlay mobile (compartilhado) */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 49;
}
.sidebar-overlay.active { display: block; }

/* ════════════════════════════════════════════
   RESPONSIVO — WEB + MOBILE
   lg ≥ 1024px | md < 1024px | sm < 768px | xs < 480px
════════════════════════════════════════════ */

/* ── LARGE DESKTOP ≥ 1280px ──────────────────*/

/* ── DESKTOP padrão 900–1280px ───────────────*/

/* ── TABLET ≤ 900px ──────────────────────────*/

/* ── MOBILE ≤ 640px ──────────────────────────*/

/* ── MOBILE XS ≤ 480px ───────────────────────*/

/* ════════════════════════════════════════════
   CARD DE ATENDIMENTO — busca rápida de empresa
════════════════════════════════════════════ */
.atend-card {
  background: linear-gradient(135deg, #0e1b3d 0%, #1d4ed8 60%, #2563eb 100%);
  border-radius: var(--ral);
  padding: 16px 28px;
  margin-bottom: 20px;
  position: relative; overflow: hidden;
  width: 100%;
  box-shadow: 0 8px 32px rgba(37,99,235,.3);
  /* Layout horizontal: ícone+título à esquerda, form à direita */
  display: flex;
  align-items: center;
  gap: 24px;
}
.atend-card::before {
  content: ''; position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  top: -70px; right: -40px; pointer-events: none;
}
.atend-card::after {
  content: ''; position: absolute;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
  bottom: -30px; left: 20px; pointer-events: none;
}
.atend-left {
  flex-shrink: 0;
  min-width: 220px;
  max-width: 280px;
}
.atend-title {
  font-family: 'Sora', sans-serif;
  font-size: 14px; font-weight: 700; color: #fff;
  margin-bottom: 3px; display: flex; align-items: center; gap: 7px;
  white-space: nowrap;
}
.atend-sub {
  font-size: 11px; color: rgba(255,255,255,.6);
  line-height: 1.4;
}
.atend-form { display: flex; gap: 10px; align-items: center; flex: 1; }
.atend-input {
  flex: 1;
  font-size: 14px;
  font-weight: 700;           /* NEGRITO */
  padding: 12px 16px;
  border-radius: var(--ra);
  border: none;
  background: #ffffff;        /* FUNDO BRANCO */
  color: #111827;             /* TEXTO PRETO */
  font-family: 'DM Sans', sans-serif;
  outline: none; transition: all .15s;
  caret-color: #1a56db;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.atend-input::placeholder {
  color: #9CA3AF;             /* cinza no placeholder */
  font-weight: 400;           /* placeholder sem negrito */
}
.atend-input:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,.4), 0 2px 8px rgba(0,0,0,.12);
}
.atend-btn {
  background: #fff; color: #1d4ed8;
  border: none; border-radius: var(--ra);
  padding: 12px 24px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: 'DM Sans', sans-serif; white-space: nowrap;
  transition: all .18s cubic-bezier(.4,0,.2,1); flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.12), 0 0 0 0 rgba(37,99,235,0);
}
.atend-btn:hover { background: #eff6ff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.15), 0 0 0 2px rgba(37,99,235,.15); }
.atend-btn:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.atend-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Popup / modal de resultado */
.atend-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 8000;
  align-items: center; justify-content: center; padding: 16px;
}
.atend-overlay.open { display: flex; animation: fadeInBg .2s ease; }
@keyframes fadeInBg { from { opacity:0; } to { opacity:1; } }

.atend-popup {
  background: var(--sf); border-radius: 16px;
  width: 100%; max-width: 520px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  animation: popIn .22s ease;
  overflow: hidden; position: relative;
}
@keyframes popIn {
  from { opacity:0; transform:scale(.94) translateY(10px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

/* Cabeçalho do popup */
.atend-popup-head {
  background: linear-gradient(135deg, var(--hub-dark), var(--g));
  padding: 20px 22px; display: flex; align-items: center; justify-content: space-between;
}
.atend-popup-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 380px;
}
.atend-popup-close {
  background: rgba(255,255,255,.15); border: none; cursor: pointer;
  color: #fff; font-size: 16px; width: 30px; height: 30px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .1s;
}
.atend-popup-close:hover { background: rgba(255,255,255,.3); }

/* Body do popup */
.atend-popup-body { padding: 20px 22px; }

/* Campo de info */
.atend-field {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--bd);
}
.atend-field:last-child { border-bottom: none; }
.atend-field-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--gl); display: flex; align-items: center;
  justify-content: center; font-size: 14px; flex-shrink: 0; margin-top: 1px;
}
.atend-field-info { flex: 1; min-width: 0; }
.atend-field-label {
  font-size: 10px; font-weight: 600; color: var(--tx3);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px;
}
.atend-field-value {
  font-size: 13px; font-weight: 500; color: var(--tx);
  word-break: break-word;
}
.atend-field-value.empty { color: var(--tx3); font-style: italic; font-weight: 400; }

/* Múltiplos resultados */
.atend-multi-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.atend-multi-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--bd); border-radius: var(--ra);
  cursor: pointer; transition: all .12s;
}
.atend-multi-item:hover { background: var(--gl); border-color: var(--g); }
.atend-multi-nome { font-size: 13px; font-weight: 600; color: var(--tx); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atend-multi-cnpj { font-size: 11px; color: var(--tx3); flex-shrink: 0; }

/* Sem resultado */
.atend-btn-voltar {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 1px solid var(--bd2);
  border-radius: var(--ra); padding: 6px 12px;
  font-size: 11px; color: var(--tx2); cursor: pointer;
  margin-bottom: 12px; font-family: inherit;
  transition: all .12s;
}
.atend-btn-voltar:hover { background: var(--gl); color: var(--g); border-color: var(--g); }

.atend-noresult {
  text-align: center; padding: 32px 20px;
  color: var(--tx3); font-size: 13px;
}
.atend-noresult .icon { font-size: 36px; margin-bottom: 10px; }

/* mobile atend: ver @media 640px */


/* ════════════════════════════════════════════
   CERTIFICADOS DIGITAIS — Google Drive
════════════════════════════════════════════ */
.cert-section {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--ral);
  margin-bottom: 28px;
  overflow: hidden;
}
.cert-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--bd);
  background: var(--sf2); flex-wrap: wrap; gap: 8px;
}
.cert-title {
  font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--tx);
  display: flex; align-items: center; gap: 8px;
}
.cert-status {
  font-size: 10px; padding: 3px 10px; border-radius: 20px;
  font-weight: 600;
}
.cert-status.ok   { background: #D1FAE5; color: #065F46; }
.cert-status.load { background: #DBEAFE; color: #1e40af; }
.cert-status.err  { background: #FEE2E2; color: #991B1B; }

/* Barra de busca de certificados */
.cert-search-bar {
  padding: 12px 16px; border-bottom: 1px solid var(--bd);
  display: flex; gap: 8px; align-items: center;
}
.cert-search-input {
  flex: 1; font-size: 12px; padding: 7px 12px;
  border-radius: var(--ra); border: 1px solid var(--bd2);
  background: var(--sf); color: var(--tx); outline: none;
  font-family: inherit;
}
.cert-search-input:focus { border-color: var(--g); }
.cert-refresh-btn {
  background: none; border: 1px solid var(--bd2);
  border-radius: var(--ra); padding: 6px 10px;
  font-size: 11px; color: var(--tx2); cursor: pointer;
  transition: all .12s; white-space: nowrap;
}
.cert-refresh-btn:hover { background: var(--gl); color: var(--g); border-color: var(--g); }

/* Lista de arquivos */
.cert-list { padding: 8px 0; max-height: 400px; overflow-y: auto; }
.cert-list::-webkit-scrollbar { width: 4px; }
.cert-list::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 2px; }

.cert-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; transition: background .1s; cursor: pointer;
}
.cert-item:hover { background: var(--sf2); }
.cert-item-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.cert-item-icon.pfx  { background: #FEF3C7; }
.cert-item-icon.pdf  { background: #FEE2E2; }
.cert-item-icon.p12  { background: #D1FAE5; }
.cert-item-icon.gen  { background: var(--gl); }
.cert-item-info { flex: 1; min-width: 0; }
.cert-item-name {
  font-size: 12px; font-weight: 500; color: var(--tx);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cert-item-meta { font-size: 10px; color: var(--tx3); margin-top: 2px; }
.cert-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.cert-dl-btn {
  display: flex; align-items: center; gap: 4px;
  background: var(--g); color: #fff; border: none;
  border-radius: var(--ra); padding: 5px 10px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background .1s; white-space: nowrap;
}
.cert-dl-btn:hover { background: #1d4ed8; }
.cert-view-btn {
  display: flex; align-items: center;
  background: none; border: 1px solid var(--bd2);
  border-radius: var(--ra); padding: 5px 10px;
  font-size: 11px; color: var(--tx2); cursor: pointer;
  font-family: inherit; transition: all .1s; white-space: nowrap;
}
.cert-view-btn:hover { background: var(--sf2); border-color: var(--g); color: var(--g); }

.cert-empty {
  padding: 32px; text-align: center;
  color: var(--tx3); font-size: 12px;
}
.cert-empty .icon { font-size: 32px; margin-bottom: 8px; }

/* Paginação */
.cert-footer {
  padding: 10px 16px; border-top: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--tx3);
}
.cert-page-btns { display: flex; gap: 4px; }
.cert-page-btn {
  padding: 3px 8px; border: 1px solid var(--bd2); border-radius: 4px;
  background: var(--sf); cursor: pointer; font-size: 11px; color: var(--tx2);
  transition: all .1s;
}
.cert-page-btn:hover:not(:disabled) { background: var(--gl); border-color: var(--g); color: var(--g); }
.cert-page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Aviso de autenticação */
.cert-auth-warn {
  padding: 20px; text-align: center;
  background: #FFFBEB; border-top: 1px solid #FDE68A;
}
.cert-auth-warn p { font-size: 12px; color: #92400E; line-height: 1.6; margin-bottom: 12px; }
.cert-auth-btn {
  background: var(--g); color: #fff; border: none;
  border-radius: var(--ra); padding: 8px 20px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background .1s;
}
.cert-auth-btn:hover { background: #1d4ed8; }



/* ════════════════════════════════════════════
   SISTEMA DE AVISOS — MCO Contábil
   Admin: lucca.sousa@mcocontabil.com.br
   Expiração: 3 dias
════════════════════════════════════════════ */

/* Painel de avisos no hub (coluna esquerda) */
/* ════════════════════════════════════════════
   ASSISTENTE IA MCO — Chat flutuante
   Powered by GPT-4o (OpenAI)
════════════════════════════════════════════ */

/* Card flutuante — Bia Contadora */
.ai-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px 12px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(15,23,42,.18);
  color: #0f172a; cursor: pointer;
  z-index: 8800; font-family: inherit;
  transition: transform .18s, box-shadow .18s;
}
.ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(15,23,42,.22);
}
.ai-fab-text { text-align: left; line-height: 1.2; }
.ai-fab-title {
  font-size: 13.5px; font-weight: 700; color: #0f172a;
  font-family: 'Sora', sans-serif;
}
.ai-fab-sub {
  font-size: 12px; color: #64748b; font-weight: 500;
  margin-top: 2px;
}
.ai-fab-avatar-wrap {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,.32);
}
.ai-fab-avatar { font-size: 24px; line-height: 1; }
.ai-fab-badge {
  position: absolute; top: -2px; right: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #ea580c; color: #fff;
  font-size: 11px; font-weight: 700;
  display: none; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.ai-fab-badge.show { display: flex; }
@media (max-width: 700px) {
  .ai-fab { bottom: 16px; right: 16px; padding: 10px 12px 10px 14px; gap: 10px; }
  .ai-fab-title { font-size: 12.5px; }
  .ai-fab-sub { font-size: 11px; }
  .ai-fab-avatar-wrap { width: 38px; height: 38px; }
  .ai-fab-avatar { font-size: 20px; }
}

/* ── Botão anexar e preview ──────────────────────────── */
.ai-attach-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sf); border: 1.5px solid var(--bd2);
  color: var(--tx2); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; transition: all .15s;
}
.ai-attach-btn:hover { background: #eff6ff; color: var(--g); border-color: var(--g); }
.ai-file-preview {
  display: none; align-items: center; gap: 8px;
  padding: 6px 10px 0 14px; font-size: 12px; color: var(--tx2);
  flex-shrink: 0;
}
.ai-file-preview.show { display: flex; }
.ai-file-preview-name {
  flex: 1; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font-weight: 600; color: var(--hub-dark);
}
.ai-file-preview-rm {
  background: none; border: none; cursor: pointer;
  color: var(--tx3); font-size: 14px; padding: 0 2px;
  line-height: 1; transition: color .15s;
}
.ai-file-preview-rm:hover { color: #dc2626; }

/* ── Botão download de resposta ─────────────────────── */
.ai-msg-download {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; padding: 5px 12px;
  background: #f0f4ff; border: 1px solid #c7d7f4;
  border-radius: 12px; font-size: 11px; font-weight: 700;
  color: var(--hub-dark); cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.ai-msg-download:hover { background: #dce8ff; }

/* ── Responsivo mobile ──────────────────────────────── */
@media (max-width: 640px) {
  .ai-chat-window {
    width: calc(100vw - 16px) !important;
    height: calc(100dvh - 100px) !important;
    bottom: 88px !important; right: 8px !important;
    border-radius: 16px !important;
  }
  .ai-fab { bottom: 16px; right: 16px; }
  .ai-chat-input-area { padding: 8px 10px 10px; }
  .ai-chat-input { font-size: 16px !important; min-height: 46px; padding: 12px 16px; }
  .ai-attach-btn { width: 42px; height: 42px; font-size: 20px; }
  .ai-send-btn   { width: 42px; height: 42px; }
  .ai-chat-msgs  { padding: 14px 12px; }
}

/* Janela de chat */
.ai-chat-window {
  position: fixed;
  top: 16px; bottom: 100px; right: 28px;
  width: 540px; max-height: min(780px, calc(100dvh - 120px));
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.08);
  display: flex; flex-direction: column;
  z-index: 8800; overflow: hidden;
  transform: scale(.92) translateY(12px);
  opacity: 0; pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
.ai-chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1; pointer-events: all;
}

/* Header do chat */
.ai-chat-header {
  background: linear-gradient(135deg, var(--hub-dark) 0%, var(--g) 100%);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.ai-chat-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.ai-chat-info { flex: 1; min-width: 0; }
.ai-chat-name {
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 700; color: #fff;
}
.ai-chat-status {
  font-size: 11px; color: rgba(255,255,255,.65);
  display: flex; align-items: center; gap: 5px; margin-top: 2px;
}
.ai-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
}
.ai-chat-close {
  background: rgba(255,255,255,.15); border: none; cursor: pointer;
  color: #fff; font-size: 16px; width: 34px; height: 34px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .1s;
}
.ai-chat-close:hover { background: rgba(255,255,255,.3); }

/* Área de mensagens */
.ai-chat-msgs {
  flex: 1; overflow-y: auto; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
}
.ai-chat-msgs::-webkit-scrollbar { width: 4px; }
.ai-chat-msgs::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 2px; }

/* Mensagens */
.ai-msg {
  display: flex; gap: 10px; max-width: 90%;
}
.ai-msg.user {
  align-self: flex-end; flex-direction: row-reverse;
}
.ai-msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gl); flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.ai-msg.user .ai-msg-avatar {
  background: var(--g); color: #fff; font-size: 12px; font-weight: 700;
}
.ai-msg-bubble {
  padding: 11px 15px; border-radius: 14px;
  font-size: 14.5px; line-height: 1.6; color: var(--tx);
  background: var(--sf2); border: 1px solid var(--bd);
  max-width: 100%;
}
.ai-msg.user .ai-msg-bubble {
  background: var(--g); color: #fff; border-color: transparent;
  border-radius: 14px 14px 4px 14px;
}
.ai-msg.bot .ai-msg-bubble {
  border-radius: 14px 14px 14px 4px;
}
/* Markdown básico nas respostas */
.ai-msg-bubble strong { font-weight: 700; }
.ai-msg-bubble em { font-style: italic; }
.ai-msg-bubble code {
  background: rgba(0,0,0,.07); padding: 2px 6px;
  border-radius: 3px; font-size: 12.5px; font-family: monospace;
}
.ai-msg.user .ai-msg-bubble code { background: rgba(255,255,255,.2); }
.ai-msg-bubble ul, .ai-msg-bubble ol { padding-left: 18px; margin: 6px 0; }
.ai-msg-bubble li { margin-bottom: 3px; }
.ai-msg-bubble p { margin: 0 0 8px; }
.ai-msg-bubble p:last-child { margin: 0; }

/* Timestamp */
.ai-msg-time {
  font-size: 10px; color: var(--tx3);
  margin-top: 4px; text-align: right;
}
.ai-msg.bot .ai-msg-time { text-align: left; }

/* Typing indicator */
.ai-typing .ai-msg-bubble {
  display: flex; align-items: center; gap: 5px; padding: 14px 18px;
}
.ai-typing-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tx3); animation: aiTyping 1.2s ease-in-out infinite;
}
.ai-typing-dot:nth-child(2) { animation-delay: .2s; }
.ai-typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes aiTyping {
  0%,80%,100% { transform: scale(0.6); opacity: .4; }
  40%          { transform: scale(1);   opacity: 1; }
}

/* Chips de sugestão */
.ai-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 16px 12px; flex-shrink: 0;
}
.ai-chip {
  font-size: 13px; padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--bd2); background: var(--sf);
  color: var(--tx2); cursor: pointer; transition: all .12s;
  white-space: nowrap; font-family: inherit;
}
.ai-chip:hover { background: var(--gl); border-color: var(--g); color: var(--g); }

/* Input area */
.ai-chat-input-area {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--bd);
  display: flex; flex-direction: column; gap: 0;
  flex-shrink: 0; background: var(--sf);
}
.ai-chat-input-row {
  display: flex; gap: 8px; align-items: flex-end;
}
.ai-chat-input {
  flex: 1; font-size: 14px; padding: 12px 14px;
  border-radius: 22px; border: 1.5px solid var(--bd2);
  background: var(--sf2); color: var(--tx);
  font-family: inherit; outline: none; resize: none;
  min-height: 44px; max-height: 140px; line-height: 1.4;
  transition: border-color .15s;
}
.ai-chat-input:focus { border-color: var(--g); background: #fff; }
.ai-chat-input::placeholder { color: var(--tx3); font-size: 13px; }
.ai-send-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--g); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0; transition: background .12s;
}
.ai-send-btn:hover { background: #1d4ed8; }
.ai-send-btn:disabled { background: var(--tx3); cursor: not-allowed; }

/* ── Toggle de modo (Tributário / Domínio) ─────────── */
.ai-mode-toggle {
  display: flex; gap: 2px; margin-top: 6px;
  background: rgba(255,255,255,.12); border-radius: 10px;
  padding: 2px; overflow: hidden;
}
.ai-mode-btn {
  flex: 1; padding: 6px 10px; border: none; cursor: pointer;
  font-size: 11.5px; font-weight: 600; font-family: inherit;
  color: rgba(255,255,255,.55); background: transparent;
  transition: all .15s; white-space: nowrap; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.ai-mode-btn.active {
  background: rgba(255,255,255,.22); color: #fff;
}
.ai-mode-btn:hover:not(.active) {
  color: rgba(255,255,255,.8);
}

/* ── Container cards Domínio ───────────────────────── */
.ai-dominio-cards {
  display: flex; flex-direction: column; gap: 8px;
  max-width: 88%;
}

/* ── Card de passos (Domínio) ──────────────────────── */
.ai-passos-card {
  background: #f8faff; border: 1px solid #e2e8f5;
  border-radius: 12px; padding: 14px 16px;
}
.ai-passos-title {
  font-size: 12px; font-weight: 700; color: var(--g);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 10px;
}
.ai-passos-card ol {
  margin: 0; padding-left: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.ai-passos-card li {
  font-size: 13.5px; color: #1e2d4f; line-height: 1.6;
}
.ai-passos-card li strong { font-weight: 700; }

/* ── Botão link do artigo ──────────────────────────── */
.ai-article-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: #fff; border: 1.5px solid var(--g);
  border-radius: 12px; color: var(--g);
  text-decoration: none; cursor: pointer;
  transition: background .15s; font-family: inherit;
}
.ai-article-link:hover { background: #eff6ff; }
.ai-article-link-icon { font-size: 18px; flex-shrink: 0; }
.ai-article-link-info { flex: 1; min-width: 0; }
.ai-article-link-title {
  font-weight: 700; font-size: 13px; color: var(--hub-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-article-link-domain {
  font-size: 11px; opacity: .6; margin-top: 2px; color: var(--tx2);
}
.ai-article-link-arrow { margin-left: auto; font-size: 16px; flex-shrink: 0; }

/* ── Badge de fonte ────────────────────────────────── */
.ai-source-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 16px;
  font-size: 11px; font-weight: 600; width: fit-content;
}
.ai-source-web { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.ai-source-manual { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.ai-source-geral { background: #fefce8; border: 1px solid #fde68a; color: #92400e; }

/* ── Status de busca Domínio ───────────────────────── */
.ai-search-status {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; background: #eef2ff;
  border-radius: 10px; width: fit-content;
  border: 1px solid #d1daf0;
  font-size: 12px; color: #6b7c9e;
  margin-bottom: 4px;
}

/* Mobile */


/* ════════════════════════════════════════════
   PAINEL ADMIN — Gerenciamento de Colaboradores
════════════════════════════════════════════ */
.admin-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(8, 14, 35, .58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9600;
  align-items: center; justify-content: center; padding: 24px;
}
.admin-overlay.open { display: flex; animation: fadeInBg .22s ease; }
.admin-modal {
  background: #fff; border-radius: 18px;
  width: 100%; max-width: 1180px; max-height: 92vh;
  box-shadow: 0 32px 80px rgba(2, 8, 30, .35), 0 4px 16px rgba(2, 8, 30, .12);
  overflow: hidden; display: flex; flex-direction: column;
  animation: popIn .26s cubic-bezier(.2,.8,.2,1);
}
.admin-modal-head {
  background:
    radial-gradient(circle at 0% 0%, rgba(96,165,250,.35), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(37,99,235,.35), transparent 55%),
    linear-gradient(135deg, #0c1e4a 0%, #1d4ed8 60%, #2563eb 100%);
  padding: 20px 26px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  position: relative;
}
.admin-modal-head::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.06));
  pointer-events: none;
}
.admin-modal-title {
  font-family: 'Sora', sans-serif;
  font-size: 17px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 12px;
  letter-spacing: -.01em;
}
.admin-modal-title .admin-title-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.2);
}
.admin-modal-title .admin-title-sub {
  display: block; font-size: 11.5px; color: rgba(255,255,255,.78);
  font-weight: 500; margin-top: 2px; letter-spacing: 0;
}
.admin-modal-close {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.18);
  cursor: pointer; color: #fff; font-size: 15px;
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s;
}
.admin-modal-close:hover { background: rgba(255,255,255,.28); transform: scale(1.05); }
.admin-modal-body { flex: 1; overflow-y: auto; padding: 24px 26px 26px; background: #f8fafc; }

/* Formulário de novo usuário */
.admin-form {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 14px; padding: 18px 20px 16px; margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(2, 8, 30, .04);
}
.admin-form-title {
  font-size: 11px; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.admin-form-title::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 0 8px rgba(37,99,235,.5);
}
.admin-form-grid {
  display: grid; grid-template-columns: 1.4fr 1.4fr 1fr 1fr; gap: 14px;
  margin-bottom: 14px;
}
.admin-field { display: flex; flex-direction: column; }
.admin-field label {
  display: block; font-size: 11.5px; font-weight: 600; color: #475569;
  margin-bottom: 6px; letter-spacing: .01em;
}
.admin-field input, .admin-field select {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1.5px solid #e2e8f0; font-size: 13px;
  font-family: inherit; outline: none; color: #0f172a;
  background: #f8fafc; box-sizing: border-box;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.admin-field input::placeholder { color: #94a3b8; }
.admin-field input:focus, .admin-field select:focus {
  border-color: #2563eb; background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.admin-form-actions { display: flex; justify-content: flex-end; }
.admin-btn-add {
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; border: 0;
  border-radius: 10px; padding: 10px 22px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: transform .08s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(37,99,235,.25);
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-btn-add:hover { box-shadow: 0 6px 20px rgba(37,99,235,.38); }
.admin-btn-add:active { transform: translateY(1px); }

/* Toolbar (busca + contador) */
.admin-toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.admin-search-wrap {
  flex: 1; position: relative;
}
.admin-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: 16px; pointer-events: none;
  line-height: 1;
}
.admin-search-input {
  width: 100%; padding: 10px 14px 10px 38px;
  border-radius: 10px; border: 1.5px solid #e2e8f0;
  font-size: 13px; font-family: inherit; outline: none;
  background: #fff; color: #0f172a; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.admin-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.admin-counter {
  font-size: 12px; font-weight: 600; color: #475569;
  background: #fff; padding: 8px 14px; border-radius: 999px;
  border: 1px solid #e2e8f0;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.admin-counter::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,.55);
}

/* Tabela de usuários */
.admin-table-wrap {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(2,8,30,.04);
}
.admin-table-scroll { max-height: 480px; overflow-y: auto; }
.admin-users-table { width: 100%; border-collapse: collapse; }
.admin-users-table th {
  font-size: 10.5px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 12px 14px; border-bottom: 1px solid #e2e8f0;
  text-align: left; background: #f8fafc;
  position: sticky; top: 0; z-index: 1;
}
.admin-users-table td {
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
  font-size: 13px; color: #0f172a; vertical-align: middle;
}
.admin-users-table tr:last-child td { border-bottom: none; }
.admin-users-table tr { transition: background .12s; }
.admin-users-table tbody tr:hover { background: #f8fafc; }

/* Avatar */
.admin-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2,8,30,.12);
}
.admin-name-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-name-info { min-width: 0; flex: 1; }
.admin-name-info .nm { font-weight: 600; color: #0f172a; font-size: 13px; line-height: 1.2; word-break: break-word; }
.admin-name-info .em { font-size: 11.5px; color: #64748b; line-height: 1.3; margin-top: 2px; word-break: break-all; }

/* Departamento select estilizado */
.admin-dept-select {
  appearance: none; -webkit-appearance: none;
  background: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center;
  padding: 6px 26px 6px 10px;
  border-radius: 7px; border: 1px solid #e2e8f0;
  font-size: 11.5px; font-family: inherit; cursor: pointer;
  font-weight: 600; color: #1e293b; min-width: 132px;
  transition: border-color .15s, box-shadow .15s;
}
.admin-dept-select:hover { border-color: #cbd5e1; }
.admin-dept-select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

/* Switch toggle (líder) */
.admin-switch {
  position: relative; display: inline-block;
  width: 36px; height: 20px; cursor: pointer;
}
.admin-switch input { opacity: 0; width: 0; height: 0; }
.admin-switch .slider {
  position: absolute; inset: 0;
  background: #cbd5e1; border-radius: 999px;
  transition: background .2s;
}
.admin-switch .slider::before {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  left: 3px; top: 3px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}
.admin-switch input:checked + .slider { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.admin-switch input:checked + .slider::before { transform: translateX(16px); }
.admin-switch input:focus-visible + .slider { box-shadow: 0 0 0 3px rgba(37,99,235,.25); }

/* Status pill */
.admin-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  border: 0; font-family: inherit;
  transition: transform .08s, box-shadow .15s;
}
.admin-status:active { transform: translateY(1px); }
.admin-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.admin-status.is-on  { background: #d1fae5; color: #065f46; }
.admin-status.is-on::before  { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,.6); animation: adminPulse 2.4s ease-in-out infinite; }
.admin-status.is-off { background: #fee2e2; color: #991b1b; }
.admin-status.is-off::before { background: #dc2626; }
@keyframes adminPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* Permissões badge */
.admin-perms {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 8px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3;
  font-family: inherit;
  transition: background .12s, border-color .12s, transform .08s;
}
.admin-perms:hover { background: #e0e7ff; border-color: #a5b4fc; }
.admin-perms.is-full { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.admin-perms.is-full:hover { background: #d1fae5; }
.admin-perms .num { font-weight: 700; }

/* Ações (ícones) */
.admin-actions { display: inline-flex; gap: 6px; }
.admin-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 8px; cursor: pointer;
  color: #475569; font-size: 14px;
  transition: all .12s; font-family: inherit;
}
.admin-action-btn:hover { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; transform: translateY(-1px); }
.admin-action-btn.danger:hover { background: #fee2e2; border-color: #dc2626; color: #b91c1c; }
.admin-action-btn .label { display: none; }
.admin-self-tag { font-size: 11px; color: #94a3b8; font-style: italic; padding: 0 6px; }

/* Mensagens */
.admin-msg {
  padding: 11px 14px; border-radius: 10px; font-size: 12.5px;
  font-weight: 600; margin-bottom: 14px; display: none;
  border: 1px solid transparent;
}
.admin-msg.ok  { background: #d1fae5; color: #065f46; display: block; border-color: #a7f3d0; }
.admin-msg.err { background: #fee2e2; color: #991b1b; display: block; border-color: #fca5a5; }

@media (max-width: 1024px) {
  .admin-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .admin-overlay { padding: 12px; }
  .admin-modal { border-radius: 14px; }
  .admin-modal-head { padding: 16px 18px; }
  .admin-modal-body { padding: 16px 16px 18px; }
  .admin-modal-title { font-size: 15px; gap: 10px; }
  .admin-modal-title .admin-title-icon { width: 32px; height: 32px; font-size: 16px; }
  .admin-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .admin-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .admin-counter { align-self: flex-start; }
  .admin-table-scroll { max-height: 60vh; }
  .admin-users-table th, .admin-users-table td { padding: 10px 8px; font-size: 12px; }
}

/* Botão admin no hub */
.hub-admin-btn {
  background: var(--g); border: none;
  border-radius: var(--ra); padding: 6px 14px;
  font-size: 11px; font-weight: 700; color: #fff;
  cursor: pointer; font-family: inherit; transition: all .12s;
  display: none;
}
.hub-admin-btn:hover { background: #1d4ed8; transform: translateY(-1px); }



/* ════════════════════════════════════════
   CARD PENDÊNCIAS DE CADASTRO — Hub
════════════════════════════════════════ */
.pend-cadastro-panel {
  background: #fff;
  border-radius: var(--ral);
  border: 1px solid var(--bd);
  box-shadow: var(--sh);
  margin-bottom: 20px;
  overflow: hidden;
}
.pend-cadastro-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.pend-cadastro-header.open { border-bottom-color: var(--bd); }
.pend-cadastro-title {
  font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--tx);
  display: flex; align-items: center; gap: 8px;
}
.pend-cadastro-badge {
  background: #FEF3C7; color: #92400E;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  display: none;
}
.pend-cadastro-badge.tem { display: inline-block; }
.pend-cadastro-badge.zero { background: #D1FAE5; color: #065F46; display: inline-block; }
.pend-cadastro-chevron {
  font-size: 11px; color: var(--tx3);
  transition: transform .2s;
}
.pend-cadastro-header.open .pend-cadastro-chevron { transform: rotate(180deg); }
.pend-cadastro-body { display: none; padding: 16px 18px; }
.pend-cadastro-body.open { display: block; }

.pend-cadastro-filtros {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.pend-filtro-btn {
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600;
  border: 1.5px solid var(--bd2); background: none; cursor: pointer;
  font-family: inherit; color: var(--tx2); transition: all .1s;
}
.pend-filtro-btn.ativo { background: var(--g); color: #fff; border-color: var(--g); }
.pend-filtro-btn:hover:not(.ativo) { border-color: var(--g); color: var(--g); }

.pend-cadastro-lista { display: flex; flex-direction: column; gap: 6px; }

.pend-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--ra);
  background: var(--sf2); border: 1px solid var(--bd);
  font-size: 12px;
}
.pend-item-icon {
  font-size: 14px; flex-shrink: 0; margin-top: 1px;
}
.pend-item-info { flex: 1; min-width: 0; }
.pend-item-empresa {
  font-weight: 700; color: var(--tx); font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pend-item-colunas {
  display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px;
}
.pend-col-badge {
  font-size: 10px; font-weight: 700; padding: 1px 7px;
  border-radius: 20px; white-space: nowrap;
}
.pend-col-dominio    { background: #EFF6FF; color: #1D4ED8; }
.pend-col-acessorias { background: #F0FDF4; color: #15803D; }
.pend-col-sieg       { background: #FFF7ED; color: #C2410C; }
.pend-col-fiscal     { background: #ECFEFF; color: #0E7490; }
.pend-col-contabil   { background: #DBEAFE; color: #1E40AF; }
.pend-col-societario { background: #F5F3FF; color: #5B21B6; }

.pend-cadastro-vazio {
  text-align: center; padding: 20px;
  color: var(--tx3); font-size: 13px;
}
.pend-cadastro-loading {
  text-align: center; padding: 16px;
  color: var(--tx3); font-size: 12px;
}



/* hub controlado por JS */

/* ── Modal de Acesso ao Dashboard ───────────────────────── */
.dash-auth-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:9900; align-items:center; justify-content:center; overflow-y:auto; }
.dash-auth-overlay.open { display:flex; }
.dash-auth-card { background:#fff; border-radius:20px; padding:40px 36px; width:100%; max-width:400px; max-height:90vh; overflow-y:auto; text-align:center; box-shadow:0 24px 64px rgba(0,0,0,.25); }
.dash-auth-logo { font-family:'Sora',sans-serif; font-size:22px; font-weight:800; color:var(--g); margin-bottom:4px; }
.dash-auth-sub  { font-size:12px; color:var(--tx3); margin-bottom:20px; }
.dash-auth-title { font-size:16px; font-weight:700; color:var(--tx); margin-bottom:8px; }
.dash-auth-desc { font-size:12px; color:var(--tx2); margin-bottom:22px; line-height:1.6; }
.dash-auth-btn { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:12px 20px; border-radius:10px; border:1.5px solid #d1d5db; background:#fff; font-size:14px; font-weight:600; color:#111; cursor:pointer; font-family:inherit; margin-bottom:10px; }
.dash-auth-btn:hover { background:#f9fafb; border-color:var(--g); }
.dash-auth-cancel { background:none; border:none; color:var(--tx3); font-size:12px; cursor:pointer; font-family:inherit; text-decoration:underline; }
.dash-auth-erro { background:#FEE2E2; color:#991B1B; border-radius:8px; padding:10px 14px; font-size:12px; font-weight:600; margin-top:12px; display:none; }
.dash-auth-erro.show { display:block; }

/* ════════════════════════════════════════════
   RESPONSIVO — Web, Tablet e Mobile
════════════════════════════════════════════ */
@media (min-width: 1280px) {
  :root { --hub-sidebar-w: 260px; }
  .hub-content { padding: 36px 40px; }
  .hub-cards   { grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap:14px; }
  .content     { padding: 24px 32px; }
  .mrow        { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .mrow3       { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (min-width: 900px) and (max-width: 1279px) {
  :root { --hub-sidebar-w: 240px; }
  .hub-content { padding: 28px 32px; }
  .hub-cards   { grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap:12px; }
  .content     { padding: 20px 24px; }
  .mrow        { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .mrow3       { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
/* ── Modal RH — Pop-up + Admin ──────────── */
.rh-overlay { display:none; position:fixed; inset:0; z-index:9500; background:rgba(0,0,0,.5); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); align-items:center; justify-content:center; padding:20px; }
.rh-overlay.show { display:flex; animation:fadeInBg .25s ease; }
.rh-panel { background:#fff; border-radius:16px; width:100%; box-shadow:0 24px 64px rgba(0,0,0,.2); overflow:hidden; position:relative; animation:popIn .25s ease; display:flex; flex-direction:column; max-height:90vh; }
.rh-panel-popup { max-width:480px; }
.rh-panel-admin { max-width:740px; }
.rh-close { position:absolute; top:12px; right:12px; z-index:2; background:rgba(255,255,255,.18); border:none; cursor:pointer; color:#fff; font-size:20px; width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.rh-close:hover { background:rgba(255,255,255,.35); }
.rh-head { background:linear-gradient(135deg,#0e1b3d 0%,#2563eb 100%); padding:24px 28px 20px; position:relative; }
.rh-head-center { text-align:center; }
.rh-head-date { font-size:11px; color:rgba(255,255,255,.55); font-weight:500; margin-bottom:4px; text-transform:uppercase; letter-spacing:.05em; }
.rh-head-brand { font-family:'Sora',sans-serif; font-size:9px; font-weight:700; color:rgba(255,255,255,.35); letter-spacing:.15em; text-transform:uppercase; margin-bottom:6px; }
.rh-head-title { font-family:'Sora',sans-serif; font-size:20px; font-weight:700; color:#fff; line-height:1.3; display:flex; align-items:center; gap:8px; }
.rh-head-sub { font-size:11px; color:rgba(255,255,255,.5); margin-top:3px; }
.rh-body { padding:20px 24px; flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.rh-foot { padding:14px 24px; border-top:1px solid #e2e8f0; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.rh-timer { font-size:10px; color:#94a3b8; font-variant-numeric:tabular-nums; }
.rh-progress { height:3px; background:#e2e8f0; border-radius:2px; overflow:hidden; flex:1; }
.rh-progress-fill { height:100%; background:#2563eb; transition:width 1s linear; border-radius:2px; }
.rh-btn { background:linear-gradient(135deg,#2563eb,#3b82f6); color:#fff; border:none; border-radius:8px; padding:9px 20px; font-size:12px; font-weight:700; cursor:pointer; font-family:'DM Sans',sans-serif; transition:all .18s; box-shadow:0 2px 8px rgba(37,99,235,.2); }
.rh-btn:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(37,99,235,.3); }
.rh-btn:active { transform:translateY(0); }
.rh-btn-sec { background:none; color:#2563eb; border:1.5px solid #2563eb; box-shadow:none; }
.rh-btn-sec:hover { background:#eff6ff; box-shadow:none; transform:none; }
.rh-btn-sm { padding:5px 12px; font-size:11px; }
.rh-btn-danger { background:#dc2626; box-shadow:0 2px 8px rgba(220,38,38,.2); }
.rh-btn-danger:hover { box-shadow:0 4px 12px rgba(220,38,38,.3); }
.rh-btn-edit { background:none; color:#2563eb; border:1px solid #bfdbfe; box-shadow:none; }
.rh-btn-edit:hover { background:#eff6ff; }
/* Popup blocks */
.rh-block { margin-bottom:18px; }
.rh-block:last-child { margin-bottom:0; }
.rh-lbl { font-family:'Sora',sans-serif; font-size:10px; font-weight:700; color:#2563eb; text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px; display:flex; align-items:center; gap:5px; }
.rh-lbl i { font-size:13px; }
.rh-lbl-green { color:#059669; }
.rh-lbl-amber { color:#d97706; }
.rh-lbl-pink { color:#be185d; }
.rh-quote { font-size:14px; color:#0f172a; line-height:1.65; font-style:italic; border-left:3px solid #2563eb; padding-left:14px; }
.rh-quote-green { border-left-color:#059669; }
.rh-author { font-size:11px; color:#94a3b8; margin-top:6px; padding-left:17px; }
.rh-verse-wrap { background:#f8fafc; border-radius:10px; padding:16px; }
.rh-pop-card { background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:14px 16px; margin-bottom:8px; }
.rh-pop-card-pink { background:#fdf2f8; border-color:#fbcfe8; }
.rh-pop-card-blue { background:#eff6ff; border-color:#bfdbfe; }
.rh-pop-card-title { font-size:13px; font-weight:700; color:#92400e; margin-bottom:4px; }
.rh-pop-card-pink .rh-pop-card-title { color:#9d174d; }
.rh-pop-card-blue .rh-pop-card-title { color:#1e40af; }
.rh-pop-card-desc { font-size:12px; color:#78350f; line-height:1.5; }
.rh-pop-card-pink .rh-pop-card-desc { color:#831843; }
.rh-pop-card-blue .rh-pop-card-desc { color:#1e3a5f; }
.rh-pop-cat { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:2px 7px; border-radius:10px; margin-bottom:6px; display:inline-block; }
/* Admin */
.rh-tabs { display:flex; gap:2px; padding:0 24px; border-bottom:1px solid #e2e8f0; background:#fff; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.rh-tab { padding:10px 14px; font-size:11px; font-weight:600; color:#64748b; cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; transition:all .12s; font-family:inherit; background:none; border-top:none; border-left:none; border-right:none; }
.rh-tab:hover { color:#0f172a; }
.rh-tab.active { color:#2563eb; border-bottom-color:#2563eb; }
.rh-adm-section { display:none; }
.rh-adm-section.active { display:block; }
.rh-adm-card { background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:14px 16px; margin-bottom:10px; transition:border-color .15s; }
.rh-adm-card.destaque { border-left:3px solid #f59e0b; }
.rh-adm-card.editing { border-color:#93c5fd; background:#f0f9ff; }
.rh-adm-card-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; flex-wrap:wrap; }
.rh-adm-card-title { font-size:13px; font-weight:700; color:#0f172a; flex:1; min-width:0; }
.rh-adm-card-body { font-size:12px; color:#475569; line-height:1.5; }
.rh-adm-card-meta { font-size:10px; color:#94a3b8; margin-top:6px; display:flex; gap:8px; flex-wrap:wrap; }
.rh-adm-card-actions { display:flex; gap:5px; margin-top:8px; flex-wrap:wrap; }
.rh-badge { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:2px 8px; border-radius:10px; display:inline-block; }
.rh-badge-ativo { background:#d1fae5; color:#065f46; }
.rh-badge-expirado { background:#fef3c7; color:#92400e; }
.rh-badge-inativo { background:#fee2e2; color:#991b1b; }
.rh-badge-comunicado { background:#dbeafe; color:#1d4ed8; }
.rh-badge-aniversariante { background:#fce7f3; color:#be185d; }
.rh-badge-premiacao,.rh-badge-destaque { background:#fef3c7; color:#92400e; }
.rh-badge-melhor_equipe { background:#fef3c7; color:#92400e; }
.rh-badge-aviso_geral { background:#f1f5f9; color:#475569; }
.rh-badge-meta { background:#d1fae5; color:#065f46; }
.rh-badge-reuniao { background:#e0e7ff; color:#3730a3; }
.rh-badge-campanha { background:#ede9fe; color:#5b21b6; }
.rh-badge-reconhecimento { background:#fce7f3; color:#9d174d; }
.rh-adm-empty { text-align:center; padding:24px 16px; color:#94a3b8; font-size:12px; }
.rh-adm-form-toggle { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.rh-adm-form-wrap { display:none; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:16px; margin-bottom:16px; }
.rh-adm-form-wrap.open { display:block; }
.rh-filter-row { display:flex; gap:5px; margin-bottom:12px; flex-wrap:wrap; }
.rh-filter-chip { padding:4px 12px; border-radius:20px; font-size:10px; font-weight:700; cursor:pointer; border:1.5px solid #e2e8f0; background:#fff; color:#64748b; transition:all .12s; font-family:inherit; }
.rh-filter-chip.active { background:#2563eb; color:#fff; border-color:#2563eb; }
.rh-form-row { margin-bottom:8px; }
.rh-form-label { font-size:11px; font-weight:700; color:#475569; display:block; margin-bottom:3px; text-transform:uppercase; letter-spacing:.04em; }
.rh-form-input { width:100%; padding:8px 12px; border:1.5px solid #e2e8f0; border-radius:8px; font-size:13px; font-family:inherit; color:#0f172a; outline:none; transition:border-color .15s; background:#fff; box-sizing:border-box; }
.rh-form-input:focus { border-color:#2563eb; }
.rh-form-textarea { resize:vertical; min-height:50px; }
.rh-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.rh-inline-edit { width:100%; padding:6px 10px; border:1.5px solid #93c5fd; border-radius:6px; font-size:13px; font-family:inherit; background:#fff; outline:none; box-sizing:border-box; }
.rh-inline-edit:focus { border-color:#2563eb; }
.rh-edit-actions { display:flex; gap:6px; margin-top:8px; }
.rh-api-tag { font-size:9px; padding:2px 6px; border-radius:8px; background:#e0e7ff; color:#3730a3; font-weight:600; }
.rh-img-upload-area { border:2px dashed #cbd5e1; border-radius:10px; padding:16px; text-align:center; cursor:pointer; transition:all .15s; background:#f8fafc; position:relative; overflow:hidden; }
.rh-img-upload-area:hover { border-color:#2563eb; background:#eff6ff; }
.rh-img-upload-area.has-img { border-style:solid; border-color:#93c5fd; padding:8px; }
.rh-img-upload-area input[type="file"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; z-index:2; }
.rh-img-upload-area.has-img input[type="file"] { z-index:0; }
.rh-img-upload-area .rh-img-placeholder { font-size:11px; color:#94a3b8; padding:4px 0; }
.rh-img-upload-area .rh-img-placeholder i { font-size:24px; display:block; margin-bottom:4px; color:#cbd5e1; }
.rh-img-preview { max-width:100%; max-height:180px; border-radius:8px; object-fit:contain; display:block; margin:0 auto; }
.rh-img-remove { position:absolute; top:6px; right:6px; background:#ef4444; color:#fff; border:none; border-radius:50%; width:24px; height:24px; font-size:15px; cursor:pointer; display:flex; align-items:center; justify-content:center; line-height:1; z-index:3; box-shadow:0 1px 4px rgba(0,0,0,.2); }
.rh-img-remove:hover { background:#dc2626; }
.rh-img-uploading { font-size:11px; color:#2563eb; display:flex; align-items:center; gap:6px; justify-content:center; padding:8px 0; }
.rh-img-uploading::before { content:''; width:14px; height:14px; border:2px solid #e5e7eb; border-top-color:#2563eb; border-radius:50%; animation:sp .7s linear infinite; display:inline-block; }
.rh-adm-card-img { max-width:100%; max-height:200px; border-radius:8px; object-fit:contain; margin:8px auto 0; display:block; }
.rh-pop-card-img { max-width:100%; border-radius:8px; object-fit:contain; margin:10px auto 0; display:block; }
.rh-toast { position:fixed; bottom:24px; right:24px; z-index:9700; background:#0f172a; color:#fff; padding:10px 20px; border-radius:10px; font-size:12px; font-weight:600; font-family:'DM Sans',sans-serif; opacity:0; transform:translateY(10px); transition:all .25s; pointer-events:none; }
.rh-toast.show { opacity:1; transform:translateY(0); }
@media (max-width:640px) {
  .rh-overlay { padding:0; align-items:flex-end; }
  .rh-panel { max-width:100% !important; border-radius:16px 16px 0 0; max-height:94vh; }
  .rh-head { padding:20px 18px 16px; }
  .rh-head-title { font-size:16px; }
  .rh-body { padding:16px 18px; }
  .rh-foot { padding:12px 18px; }
  .rh-tabs { padding:0 14px; gap:0; }
  .rh-tab { padding:9px 10px; font-size:10px; }
  .rh-form-grid { grid-template-columns:1fr; }
  .rh-adm-card-actions { gap:4px; }
  .rh-btn-sm { padding:5px 8px; font-size:10px; }
}

/* ── Overlay mobile sidebar ──────────── */
.hub-sidebar-overlay {
  display:none; position:fixed; inset:0; z-index:199;
  background:rgba(0,0,0,.45);
  -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
  transition:opacity .25s;
  opacity:0;
}
.hub-sidebar-overlay.active { display:block; opacity:1; }

/* ── Tablet largo (1100px): 3 cols viram pend em cima + 2 embaixo ── */
@media (max-width: 1100px) {
  .hub-grid-3col {
    grid-template-columns: 1fr 1fr;
  }
  .hub-grid-3col .pend-card { grid-column: 1 / -1; }
}

/* ── Tablet (481px–900px) ──────────── */
@media (max-width: 900px) {
  .hub-grid-2col { grid-template-columns:1fr; gap:16px; }
  .hub-grid-2col .news-body,
  .hub-grid-2col .agenda-body { max-height:280px; }
  .hub-grid-2col .avisos-body,
  .hub-grid-2col .distrato-body { max-height:260px; }
  .hub-grid-3col { grid-template-columns:1fr; gap:16px; }
  .hub-grid-3col .pend-card { grid-column: auto; }
  .hub-grid-3col .pend-body,
  .hub-grid-3col .news-body,
  .hub-grid-3col .agenda-body { max-height:280px; }
  .hub-sidebar { position:fixed;top:0;left:0;bottom:0;z-index:200;transform:translateX(-100%);transition:transform .25s cubic-bezier(.4,0,.2,1);box-shadow:6px 0 40px rgba(0,0,0,.3);width:280px;min-width:280px;overflow-y:auto;-webkit-overflow-scrolling:touch; }
  .hub-sidebar.open { transform:translateX(0); }
  .hub-collapse-btn { display:none !important; }
  .hub-sidebar-close { display:flex !important; }
  .hub-mob-btn { display:flex !important;align-items:center;justify-content:center;width:36px;height:36px;border-radius:8px; }
  .hub-content { padding:18px 14px; }
  .hub-topbar  { padding:10px 14px; gap:8px; }
  .hub-cards   { grid-template-columns:repeat(2,1fr); gap:10px; }
  .hub-card    { padding:14px 12px; }
  .hub-section { margin-bottom:24px; }
  .atend-card  { flex-direction:column; gap:10px; padding:14px 16px; }
  .atend-left  { min-width:unset; width:100%; }
  .atend-form  { width:100%; }
  .atend-input { font-size:13px; padding:10px 14px; }
  .atend-btn   { width:100%; justify-content:center; padding:11px 16px; }
  .cert-header { flex-direction:column; align-items:flex-start; gap:8px; }
  .cert-item   { flex-wrap:wrap; padding:12px; }
  .cert-item-actions { width:100%; justify-content:flex-end; margin-top:6px; }
  .atend-overlay { align-items:flex-end; padding:0; }
  .atend-popup { position:fixed;bottom:0;left:0;right:0;max-height:92vh;border-radius:16px 16px 0 0;max-width:100%;animation:slideUp .25s ease; }
  @keyframes slideUp { from{transform:translateY(100%)}to{transform:translateY(0)} }
  .atend-popup-head { padding:16px 18px; }
  .atend-popup-title { font-size:14px; max-width:calc(100vw - 100px); }
  .atend-popup-body { padding:16px 18px; max-height:calc(92vh - 60px); overflow-y:auto; -webkit-overflow-scrolling:touch; }
  .atend-field { padding:10px 12px; gap:10px; }
  /* Sidebar departamentos */
  .hub-dept-toggle { padding:10px 18px; font-size:9px; min-height:40px; }
  .hub-dept-sublink.hub-card { padding:9px 18px 9px 40px !important; min-height:40px; }
  .hub-dept-sublink-name { font-size:12px; }
  .hub-sidebar-search { padding:10px 14px 8px; }
  .hub-sidebar-search-input { padding:9px 10px 9px 30px; font-size:12px; }
  /* Dashboard sidebar */
  .sidebar { position:fixed;top:0;left:0;bottom:0;z-index:200;transform:translateX(-100%);transition:transform .25s cubic-bezier(.4,0,.2,1);box-shadow:4px 0 32px rgba(0,0,0,.15);width:250px;min-width:250px; }
  .sidebar.open { transform:translateX(0); }
  .mob-menu-btn { display:flex !important;align-items:center;justify-content:center; }
  .topbar { padding:8px 14px;flex-wrap:wrap;gap:6px; }
  #filter-bar { order:3;width:100%;flex-wrap:wrap;gap:5px; }
  .filter-group { flex-wrap:wrap;gap:4px;padding:4px 8px; }
  .date-input { font-size:11px;min-width:80px;flex:1; }
  .filter-label { font-size:10px;white-space:nowrap; }
  .fbtn { font-size:10px;padding:4px 8px; }
  .content { padding:12px 14px; }
  .mrow  { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mrow3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .g2,.g3 { grid-template-columns:1fr; }
  .sync-status-bar { padding:5px 14px;gap:5px;flex-wrap:wrap; }
  .sync-pill { font-size:10px;padding:2px 7px; }
  .dash-auth-card { padding:32px 24px;margin:16px; }
  .ai-chat-window { width:calc(100vw - 20px);right:10px;bottom:80px; }
  .mgrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* ── Mobile médio (até 640px) ──────────── */
@media (max-width: 640px) {
  .hub-topbar  { padding:8px 12px; }
  .hub-content { padding:14px 10px; }
  .hub-cards   { grid-template-columns:repeat(2,1fr);gap:8px; }
  .hub-card    { padding:12px 10px; }
  .hub-card-name { font-size:11px; }
  .hub-section-title { font-size:12px;margin-bottom:10px; }
  .hub-greeting-sub { display:none; }
  .hub-clock { font-size:10px; padding:4px 8px; }
  /* Sugestões: esconder texto, só emoji */
  .hub-topbar button[onclick*="sugHub"] { padding:7px 10px !important; font-size:0 !important; }
  .hub-topbar button[onclick*="sugHub"]::before { content:'💬'; font-size:14px; }
  /* Consulta Rápida compacta */
  .atend-card { padding:12px 14px !important; margin-bottom:14px !important; border-radius:10px !important; box-shadow:0 4px 16px rgba(37,99,235,.2) !important; }
  .atend-title { font-size:13px !important; }
  .atend-sub { font-size:10px !important; }
  .atend-form { flex-direction:column; gap:8px; }
  .atend-input { font-size:13px !important; padding:10px 12px !important; border-radius:8px !important; }
  .atend-btn { width:100%; justify-content:center; font-size:12px !important; padding:10px 14px !important; border-radius:8px !important; }
  .hub-grid-2col .news-body,
  .hub-grid-2col .agenda-body { max-height:220px; }
  .hub-grid-2col .avisos-body,
  .hub-grid-2col .distrato-body { max-height:200px; }
  .content { padding:10px; }
  .topbar  { padding:6px 10px; }
  .mrow    { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
  .mrow3   { grid-template-columns:1fr;gap:8px; }
  .kpi-val { font-size:20px; }
  .kpi-lbl { font-size:10px; }
  .ni { font-size:11px;padding:7px 10px; }
  .tbl-wrap { overflow-x:auto;-webkit-overflow-scrolling:touch; }
  .atend-popup-body { padding:14px 16px; }
  .atend-field { padding:8px 10px; gap:8px; }
  .atend-field-label { font-size:9px; }
  .atend-field-value { font-size:12px; }
  .dash-auth-card { padding:28px 20px;border-radius:16px; }
  .dash-auth-logo { font-size:18px; }
  .dash-auth-btn  { font-size:13px;padding:11px 16px; }
  .admin-form-grid { grid-template-columns:1fr; }
  .calc-card { flex-direction:column;text-align:center; }
}

/* ── Mobile pequeno (até 480px) ──────────── */
@media (max-width: 480px) {
  .hub-sidebar { width:100vw; min-width:100vw; }
  .hub-cards   { grid-template-columns:1fr 1fr;gap:7px; }
  .hub-card    { padding:10px 9px; }
  .hub-hero-title { font-size:16px; }
  .hub-hero-badges { display:none; }
  .hub-topbar { padding:6px 10px; }
  .hub-content { padding:10px 8px; }
  .hub-grid-2col { gap:10px; }
  .hub-greeting-hi { font-size:12px; }
  .mrow  { grid-template-columns:1fr 1fr; }
  .mrow3 { grid-template-columns:1fr; }
  .kpi-val { font-size:18px; }
  .topbar-title { display:none; }
  .topbar-sync  { display:none; }
  #filter-bar .filter-label { display:none; }
  .atend-popup { max-height:92vh; }
  .atend-popup-title { font-size:15px; }
}

/* ── Touch devices ──────────── */
@media (hover:none) and (pointer:coarse) {
  .hub-card:hover { transform:none;box-shadow:none; }
  .hub-nav-link:hover { background:transparent; }
  .hub-dept-sublink.hub-card:hover { background:none !important; }
  .hub-nav-link { min-height:44px; }
  .hub-card { min-height:44px; }
  .hub-dept-toggle { min-height:44px; }
  .hub-dept-sublink.hub-card { min-height:44px; }
  .hub-mob-btn { min-height:44px; min-width:44px; }
  .fbtn { min-height:36px; }
  .ni   { min-height:36px; }
}

/* hub controlado por JS */

/* ── Modal Empresas do Colaborador ───────────────────────── */
.colab-link { cursor:pointer; color:var(--g); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.colab-link:hover { color:#1d4ed8; }
.colab-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:9700; align-items:center; justify-content:center; padding:16px; }
.colab-overlay.open { display:flex; animation:fadeInBg .2s ease; }
.colab-modal { background:#fff; border-radius:16px; width:100%; max-width:820px; max-height:90vh; box-shadow:0 24px 64px rgba(0,0,0,.25); overflow:hidden; display:flex; flex-direction:column; animation:popIn .22s ease; }
.colab-head { background:linear-gradient(135deg,var(--hub-dark),var(--g)); padding:16px 22px; display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
.colab-head-title { font-family:'Sora',sans-serif; font-size:15px; font-weight:700; color:#fff; }
.colab-head-sub { font-size:11px; color:rgba(255,255,255,.7); margin-top:2px; }
.colab-close { background:rgba(255,255,255,.15); border:none; cursor:pointer; color:#fff; font-size:15px; width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .1s; }
.colab-close:hover { background:rgba(255,255,255,.3); }
.colab-toolbar { display:flex; align-items:center; justify-content:space-between; padding:12px 18px; border-bottom:1px solid var(--bd); gap:10px; flex-wrap:wrap; }
.colab-search { flex:1; min-width:180px; padding:8px 12px; border-radius:var(--ra); border:1.5px solid var(--bd2); font-size:12px; font-family:inherit; outline:none; }
.colab-search:focus { border-color:var(--g); }
.colab-print-btn { display:flex; align-items:center; gap:6px; padding:8px 16px; border-radius:var(--ra); border:none; background:var(--g); color:#fff; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; transition:background .1s; white-space:nowrap; }
.colab-print-btn:hover { background:#1d4ed8; }
.colab-body { flex:1; overflow-y:auto; padding:0; }
.colab-tabs { display:flex; gap:6px; padding:12px 18px 0; border-bottom:1px solid var(--bd); flex-wrap:wrap; }
.colab-tab { padding:6px 14px; border-radius:var(--ra) var(--ra) 0 0; border:1px solid transparent; font-size:11px; font-weight:700; cursor:pointer; font-family:inherit; color:var(--tx2); background:none; transition:all .12s; white-space:nowrap; }
.colab-tab.ativo { background:#fff; border-color:var(--bd); border-bottom-color:#fff; color:var(--g); margin-bottom:-1px; }
.colab-tab:hover:not(.ativo) { background:var(--sf2); }
.colab-lista { padding:8px 18px 18px; }
.colab-empresa-item { display:flex; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid var(--bd); font-size:12px; }
.colab-empresa-item:last-child { border-bottom:none; }
.colab-empresa-num { color:var(--tx3); font-size:11px; min-width:24px; }
.colab-empresa-nome { flex:1; font-weight:500; color:var(--tx); }
.colab-empresa-cnpj { font-size:11px; color:var(--tx3); flex-shrink:0; }
.colab-empresa-trib { font-size:10px; font-weight:700; padding:1px 6px; border-radius:20px; flex-shrink:0; }
.colab-vazio { text-align:center; padding:32px; color:var(--tx3); font-size:13px; }
.colab-count { font-size:11px; color:var(--tx3); padding:8px 18px 0; }


/* ── Card de Notícias Contábeis ─────────────────────────── */
.news-card {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: var(--ral);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(5,150,105,.08);
}
.news-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  border-bottom: none;
}
.news-header-left { display:flex; align-items:center; gap:10px; }
.news-header-title {
  font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 8px;
}

.news-timer-wrap {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px; padding: 4px 12px;
}
.news-timer-ico { font-size: 13px; }
.news-timer-txt {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.9);
  white-space: nowrap; font-family: 'Sora', sans-serif;
}
.news-body { padding: 0; }
.news-loading {
  text-align: center; padding: 24px;
  font-size: 13px; color: var(--tx3);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.news-loading-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--g); animation: newsPulse .8s ease-in-out infinite;
}
.news-loading-dot:nth-child(2) { animation-delay: .15s; }
.news-loading-dot:nth-child(3) { animation-delay: .30s; }
@keyframes newsPulse {
  0%,100% { opacity:.3; transform:scale(.8); }
  50%      { opacity:1;  transform:scale(1.2); }
}
.news-item {
  display: flex; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--bd);
  transition: background .1s;
  text-decoration: none;
  color: inherit;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #f0fdf4; }
.news-item-img {
  width: 64px; height: 56px;
  border-radius: 8px; object-fit: cover;
  flex-shrink: 0; background: var(--sf2);
}
.news-item-info { flex: 1; min-width: 0; }
.news-item-title {
  font-size: 12.5px; font-weight: 600; color: var(--tx);
  line-height: 1.45; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-item:hover .news-item-title { color: var(--g); }
.news-item-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; color: var(--tx3);
}
.news-item-source {
  background: #d1fae5; color: #065f46;
  padding: 2px 8px; border-radius: 20px;
  font-weight: 700; font-size: 9px;
}
.news-footer {
  padding: 10px 18px;
  font-size: 11px; color: var(--tx3);
  border-top: 1px solid #d1fae5;
  background: #f0fdf4;
  display: flex; align-items: center; justify-content: space-between;
}

.news-erro {
  text-align: center; padding: 20px 18px;
  font-size: 12px; color: var(--tx3);
}


/* ── Card Calculadora CLT vs PJ ─────────────────────────── */
.calc-card {
  background: linear-gradient(135deg, #0f2d6e 0%, #1a56db 60%, #3b82f6 100%);
  border-radius: var(--ral);
  padding: 28px 32px;
  margin-bottom: 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; cursor: pointer;
  box-shadow: 0 8px 32px rgba(26,86,219,.35);
  transition: transform .18s, box-shadow .18s;
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
}
.calc-card::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
  pointer-events: none;
}
.calc-card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(26,86,219,.45); }
.calc-card-left {}
.calc-card-badge {
  display: inline-block;
  background: rgba(255,255,255,.15); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .07em;
}
.calc-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 20px; font-weight: 800; color: #fff;
  margin-bottom: 6px; line-height: 1.2;
}
.calc-card-desc { font-size: 12px; color: rgba(255,255,255,.75); line-height: 1.6; max-width: 420px; }
.calc-card-btn {
  flex-shrink: 0;
  background: #fff; color: var(--g);
  border: none; border-radius: var(--ra);
  padding: 12px 24px;
  font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: all .15s; display: flex; align-items: center; gap: 8px;
}
.calc-card-btn:hover { transform: scale(1.04); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.calc-card-pills {
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}
.calc-card-pill {
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.9);
  font-size: 10px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; border: 1px solid rgba(255,255,255,.2);
}


      /* QUADRO DE AVISOS - NOVAS EMPRESAS */
      .avisos-card{background:#fff;border-radius:14px;border:1.5px solid #dde3ea;overflow:hidden;margin-bottom:16px;box-shadow:0 2px 16px rgba(15,45,110,.07);}
      .avisos-hd{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1.5px solid #dde3ea;background:#f8fafc;}
      .avisos-hd-icon{font-size:20px;}
      .avisos-hd-title{font-size:13.5px;font-weight:800;color:#1e2d3d;flex:1;}
      .avisos-hd-mes{font-size:11px;font-weight:700;padding:3px 10px;border-radius:12px;background:#eff6ff;color:#1a56db;}
      .avisos-hd-count{font-size:11px;font-weight:700;padding:3px 10px;border-radius:12px;background:#d1fae5;color:#065f46;}
      .avisos-body{padding:4px 0;}
      .avisos-item{display:flex;align-items:center;gap:12px;padding:10px 18px;border-bottom:1px solid #f1f5f9;transition:background .15s;}
      .avisos-item:last-child{border-bottom:none;}
      .avisos-item:hover{background:#fafbff;}
      .avisos-num{width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,#1a56db,#0f2d6e);color:#fff;font-size:10px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
      .avisos-info{flex:1;min-width:0;}
      .avisos-nome{font-size:13px;font-weight:700;color:#1e2d3d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
      .avisos-cnpj{font-size:11px;color:#9aa5b4;margin-top:2px;font-family:'JetBrains Mono',monospace;}
      .avisos-badge{font-size:10px;font-weight:700;padding:2px 8px;border-radius:10px;white-space:nowrap;flex-shrink:0;}
      .badge-cnpj{background:#eff6ff;color:#1a56db;}
      .badge-abertura{background:#fef9c3;color:#78350f;}
      .avisos-empty{text-align:center;padding:28px 16px;color:#9aa5b4;font-size:12.5px;}
      .avisos-loading{display:flex;align-items:center;gap:8px;padding:20px 18px;color:#9aa5b4;font-size:12px;}
      .avisos-loading-dot{width:6px;height:6px;border-radius:50%;background:#1a56db;animation:avDot 1.2s ease-in-out infinite;}
      .avisos-loading-dot:nth-child(2){animation-delay:.2s;}
      .avisos-loading-dot:nth-child(3){animation-delay:.4s;}
      @keyframes avDot{0%,80%,100%{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}
      .avisos-footer{padding:8px 18px;border-top:1px solid #f1f5f9;font-size:10.5px;color:#9aa5b4;display:flex;align-items:center;justify-content:space-between;}

      .hub-admin-btn{display:none;width:100%;margin-bottom:10px;padding:8px 12px;border-radius:8px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);color:rgba(255,255,255,.85);font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;text-align:left;}
      .hub-admin-btn:hover{background:rgba(255,255,255,.14);}

      /* TELA TROCA SENHA */
      #trocaSenhaScreen{position:fixed;inset:0;z-index:9998;display:none;align-items:center;justify-content:center;background:linear-gradient(135deg,#0f2d6e 0%,#1a56db 55%,#3b82f6 100%);padding:20px;overflow-y:auto;}
      #trocaSenhaScreen.ativo{display:flex;}
      .troca-card{background:rgba(255,255,255,.97);border-radius:20px;padding:40px 36px;width:100%;max-width:420px;max-height:90vh;overflow-y:auto;text-align:center;box-shadow:0 32px 80px rgba(0,0,0,.25);animation:cardIn .4s ease;box-sizing:border-box;}
      .troca-badge{display:inline-flex;align-items:center;gap:6px;background:#fef3c7;color:#92400e;font-size:11px;font-weight:700;padding:5px 14px;border-radius:20px;margin-bottom:20px;}
      .troca-titulo{font-family:'Sora',sans-serif;font-size:20px;font-weight:700;color:#0f172a;margin-bottom:8px;}
      .troca-sub{font-size:13px;color:#64748b;margin-bottom:24px;line-height:1.6;}
      .troca-field{margin-bottom:14px;text-align:left;}
      .troca-field label{display:block;font-size:11px;font-weight:600;color:#6b7280;margin-bottom:4px;}
      .troca-field input{display:block;width:100%;padding:12px 14px;border-radius:8px;border:1.5px solid #d1d5db;font-size:14px;font-family:inherit;outline:none;color:#111;background:#fff;box-sizing:border-box;transition:border-color .15s;}
      .troca-field input:focus{border-color:#1a56db;}
      .troca-regras{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:10px 14px;margin-bottom:16px;text-align:left;}
      .troca-regras p{font-size:11px;color:#64748b;margin:0 0 4px;font-weight:600;}
      .troca-regra{display:flex;align-items:center;gap:6px;font-size:11px;color:#94a3b8;margin-bottom:2px;transition:color .2s;}
      .troca-regra.ok{color:#059669;}
      .troca-regra.ok::before{content:"✓";font-weight:700;}
      .troca-regra:not(.ok)::before{content:"·";}
      .troca-btn{display:block;width:100%;padding:12px;border-radius:8px;border:none;background:#1a56db;color:#fff;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;transition:background .15s;margin-bottom:10px;}
      .troca-btn:hover{background:#1d4ed8;}
      .troca-btn:disabled{background:#9ca3af;cursor:not-allowed;}
      .troca-erro{display:none;padding:10px 14px;border-radius:8px;font-size:12px;font-weight:600;background:#fee2e2;color:#991b1b;margin-bottom:12px;}
      .troca-erro.show{display:block;}

      /* QUADRO DISTRATO */
      .distrato-card{background:#fff;border-radius:14px;border:1.5px solid #fde8d8;overflow:hidden;margin-bottom:16px;box-shadow:0 2px 16px rgba(220,38,38,.07);}
      .distrato-hd{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1.5px solid #fde8d8;background:#fff7f5;}
      .distrato-hd-icon{font-size:20px;}
      .distrato-hd-title{font-size:13.5px;font-weight:800;color:#1e2d3d;flex:1;}
      .distrato-hd-mes{font-size:11px;font-weight:700;padding:3px 10px;border-radius:12px;background:#fee2e2;color:#dc2626;}
      .distrato-hd-count{font-size:11px;font-weight:700;padding:3px 10px;border-radius:12px;background:#fef9c3;color:#854d0e;display:none;}
      .distrato-body{padding:4px 0;}
      .distrato-item{display:flex;align-items:center;gap:12px;padding:10px 18px;border-bottom:1px solid #fef2f2;transition:background .15s;}
      .distrato-item:last-child{border-bottom:none;}
      .distrato-item:hover{background:#fff5f5;}
      .distrato-num{width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,#dc2626,#9f1239);color:#fff;font-size:10px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
      .distrato-info{flex:1;min-width:0;}
      .distrato-nome{font-size:13px;font-weight:700;color:#1e2d3d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
      .distrato-datas{font-size:11px;color:#9aa5b4;margin-top:2px;}
      .distrato-timer{flex-shrink:0;text-align:right;}
      .distrato-dias{font-size:18px;font-weight:800;line-height:1;}
      .distrato-dias.urgente{color:#dc2626;}
      .distrato-dias.atencao{color:#ea580c;}
      .distrato-dias.ok{color:#059669;}
      .distrato-dias-label{font-size:9px;font-weight:600;color:#9aa5b4;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;}
      .distrato-empty{text-align:center;padding:28px 16px;color:#9aa5b4;font-size:12.5px;}
      .distrato-loading{display:flex;align-items:center;gap:8px;padding:20px 18px;color:#9aa5b4;font-size:12px;}
      .distrato-loading-dot{width:6px;height:6px;border-radius:50%;background:#dc2626;animation:avDot 1.2s ease-in-out infinite;}
      .distrato-loading-dot:nth-child(2){animation-delay:.2s;}
      .distrato-loading-dot:nth-child(3){animation-delay:.4s;}
      .distrato-footer{padding:8px 18px;border-top:1px solid #fef2f2;font-size:10.5px;color:#9aa5b4;display:flex;align-items:center;justify-content:space-between;}

      /* QUADRO AGENDA */
      .agenda-card{background:#fff;border-radius:14px;border:1.5px solid #e0eaff;overflow:hidden;margin-bottom:16px;box-shadow:0 2px 16px rgba(26,86,219,.07);}
      .agenda-hd{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1.5px solid #e0eaff;background:#f0f5ff;}
      .agenda-hd-icon{font-size:20px;}
      .agenda-hd-title{font-size:13.5px;font-weight:800;color:#1e2d3d;flex:1;}
      .agenda-hd-data{font-size:11px;font-weight:700;padding:3px 10px;border-radius:12px;background:#dbeafe;color:#1d4ed8;}
      .agenda-hd-btns{display:flex;gap:6px;}
      .agenda-btn-novo{padding:6px 16px;border-radius:20px;border:none;background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff;font-size:11px;font-weight:700;cursor:pointer;font-family:inherit;transition:all .18s;white-space:nowrap;box-shadow:0 2px 8px rgba(37,99,235,.25);}
      .agenda-btn-novo:hover{background:linear-gradient(135deg,#1d4ed8,#2563eb);transform:translateY(-1px);box-shadow:0 4px 14px rgba(37,99,235,.35);}
      .agenda-btn-novo:active{transform:translateY(0);}
      .agenda-btn-ver{padding:6px 14px;border-radius:20px;border:1.5px solid #2563eb;background:transparent;color:#2563eb;font-size:11px;font-weight:700;cursor:pointer;font-family:inherit;transition:all .18s;white-space:nowrap;}
      .agenda-btn-ver:hover{background:#eff6ff;border-color:#1d4ed8;color:#1d4ed8;}
      .agenda-body{padding:4px 0;}
      .agenda-item{display:flex;align-items:flex-start;gap:12px;padding:10px 18px;border-bottom:1px solid #f0f5ff;cursor:pointer;transition:background .15s;text-decoration:none;color:inherit;}
      .agenda-item:last-child{border-bottom:none;}
      .agenda-item:hover{background:#f7faff;}
      .agenda-horario{display:flex;flex-direction:column;align-items:center;min-width:44px;padding-top:1px;}
      .agenda-hora-ini{font-size:13px;font-weight:800;color:#1a56db;line-height:1;}
      .agenda-hora-fim{font-size:10px;color:#9aa5b4;margin-top:1px;}
      .agenda-linha{width:2px;background:#e0eaff;flex:1;margin:3px auto;min-height:10px;border-radius:2px;}
      .agenda-info{flex:1;min-width:0;}
      .agenda-titulo{font-size:13px;font-weight:700;color:#1e2d3d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
      .agenda-detalhe{font-size:11px;color:#9aa5b4;margin-top:2px;}
      .agenda-cor{width:4px;border-radius:4px;min-height:36px;flex-shrink:0;margin-top:2px;}
      .agenda-empty{text-align:center;padding:28px 16px;color:#9aa5b4;font-size:12.5px;}
      .agenda-loading{display:flex;align-items:center;gap:8px;padding:20px 18px;color:#9aa5b4;font-size:12px;}
      .agenda-loading-dot{width:6px;height:6px;border-radius:50%;background:#1a56db;animation:avDot 1.2s ease-in-out infinite;}
      .agenda-loading-dot:nth-child(2){animation-delay:.2s;}
      .agenda-loading-dot:nth-child(3){animation-delay:.4s;}
      .agenda-footer{padding:8px 18px;border-top:1px solid #f0f5ff;font-size:10.5px;color:#9aa5b4;display:flex;align-items:center;justify-content:space-between;}
      .agenda-dia-label{padding:6px 18px 2px;font-size:10px;font-weight:800;color:#9aa5b4;text-transform:uppercase;letter-spacing:.06em;}

      /* MCO Mail Popup */
      .mail-mco-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:9999;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(4px)}
      .mail-mco-overlay.show{display:flex}
      .mail-mco-card{background:#fff;border-radius:16px;padding:0;max-width:480px;width:100%;position:relative;animation:mailPopIn .25s ease;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.2)}
      @keyframes mailPopIn{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}
      .mail-mco-close{position:absolute;top:14px;right:16px;font-size:22px;color:#999;cursor:pointer;background:none;border:none;z-index:2;line-height:1}
      .mail-mco-close:hover{color:#333}
      .mail-mco-header{background:linear-gradient(135deg,#0a1628 0%,#162544 100%);padding:28px 32px;text-align:center}
      .mail-mco-header h2{color:#fff;font-size:20px;font-weight:700;margin:0 0 4px}
      .mail-mco-header p{color:rgba(255,255,255,.6);font-size:13px;margin:0}
      .mail-mco-options{padding:24px 28px 28px;display:flex;flex-direction:column;gap:14px}
      .mail-mco-option{display:flex;align-items:center;gap:16px;padding:18px 20px;border:2px solid #e5e7eb;border-radius:12px;cursor:pointer;transition:all .15s;text-decoration:none;color:inherit}
      .mail-mco-option:hover{border-color:#0066cc;background:#f8fbff}
      .mail-mco-option-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:24px;flex-shrink:0}
      .mail-mco-option-icon.news{background:#e8f0fe;color:#0066cc}
      .mail-mco-option-icon.lead{background:#fef3c7;color:#d97706}
      .mail-mco-option-info h3{font-size:15px;font-weight:600;color:#111;margin:0 0 3px}
      .mail-mco-option-info p{font-size:12px;color:#666;margin:0;line-height:1.4}
      .mail-mco-option-arrow{margin-left:auto;font-size:18px;color:#ccc}
      .mail-mco-option:hover .mail-mco-option-arrow{color:#0066cc}
      .mail-mco-option.disabled{opacity:.5;cursor:not-allowed;pointer-events:none}
      .mail-mco-option.disabled:hover{border-color:#e5e7eb;background:transparent}
      .mail-mco-badge{display:inline-block;font-size:10px;font-weight:600;color:#fff;background:#d97706;padding:2px 8px;border-radius:4px;margin-left:8px;vertical-align:middle}
      /* Mobile modal fixes */
      @media(max-width:640px){
        .mail-mco-overlay{padding:8px}
        .mail-mco-card{border-radius:12px}
        .mail-mco-header{padding:18px 18px}
        .mail-mco-header h2{font-size:17px}
        .mail-mco-options{padding:14px 16px 16px;gap:10px}
        .mail-mco-option{padding:12px 12px;gap:10px}
        .mail-mco-option-icon{width:38px;height:38px;font-size:18px}
        .mail-mco-option-info h3{font-size:13px}
        .mail-mco-option-info p{font-size:11px}
        .cnpj-form{flex-direction:column;gap:8px}
        .cnpj-form button{width:100%}
      }
