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

:root {
  --bg: #f6f8fc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #1e40af;
  --primary-dark: #0f1a4a;
  --success: #16a34a;
  --warn: #f59e0b;
  --shadow: 0 4px 14px rgba(2, 6, 23, .08);
  --shadow2: 0 8px 24px rgba(2, 6, 23, .12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

html.capacitor-native {
  --safe-top: max(env(safe-area-inset-top, 0px), 44px);
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), 28px);
}

html, body { width: 100%; min-height: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled {
  cursor: wait;
  opacity: .72;
}
button.is-loading {
  position: relative;
}

#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.08), transparent 46%),
    linear-gradient(145deg, #0f1a4a 0%, #17215d 62%, #101844 100%);
  color: #fff;
}
#intro-screen[hidden] { display: none; }
#intro-screen.welcome-intro-screen {
  background:
    radial-gradient(680px 360px at 48% 34%, rgba(216, 176, 68, .18), transparent 64%),
    radial-gradient(780px 520px at 50% 2%, rgba(37, 99, 235, .20), transparent 58%),
    linear-gradient(155deg, #050b1e 0%, #07162f 42%, #111b4f 100%);
}
#intro-screen.welcome-intro-screen::before,
#intro-screen.welcome-intro-screen::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}
#intro-screen.welcome-intro-screen::before {
  width: 520px;
  height: 520px;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle, #000 0 42%, transparent 72%);
  opacity: .28;
  animation: introNetworkDrift 9s ease-in-out infinite alternate;
}
#intro-screen.welcome-intro-screen::after {
  width: min(84vw, 420px);
  height: 1px;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(216,176,68,.80), rgba(34,197,94,.55), transparent);
  opacity: .85;
}
.intro-skip {
  position: fixed;
  top: calc(16px + var(--safe-top));
  right: 16px;
  z-index: 4;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.welcome-intro-card {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  min-height: min(720px, calc(100vh - 44px));
  display: grid;
  align-content: center;
  gap: 20px;
  align-items: center;
  justify-items: center;
}
.intro-video-frame {
  width: 100%;
  max-height: min(54vh, 420px);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(216,176,68,.14), rgba(255,255,255,.04)),
    #07162f;
  border: 1px solid rgba(216,176,68,.24);
  box-shadow:
    0 28px 80px rgba(0,0,0,.42),
    0 0 0 1px rgba(255,255,255,.06),
    0 0 52px rgba(216,176,68,.16);
}
.intro-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #07162f;
}
.intro-during {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  color: #fff;
  animation: introRise .55s ease both;
}
.intro-during span {
  color: rgba(216,176,68,.98);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.intro-during strong {
  margin-top: 7px;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 950;
}
.intro-during p {
  max-width: 330px;
  margin-top: 8px;
  color: rgba(255,255,255,.78);
  font-size: 14px;
  line-height: 1.45;
}
.intro-during i {
  width: 126px;
  height: 4px;
  overflow: hidden;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.intro-during i::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d8b044, #22c55e);
  animation: introLoadingLine 1.45s ease-in-out infinite alternate;
}
.intro-fallback {
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}
.intro-fallback img,
.welcome-intro-copy img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 18px 42px rgba(0,0,0,.30);
}
.welcome-intro-copy {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.06));
  border: 1px solid rgba(216,176,68,.22);
  color: #fff;
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 60px rgba(0,0,0,.26);
  animation: introRise .45s ease both;
}
.welcome-intro-copy h1 {
  margin-top: 14px;
  color: #fff;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 950;
}
.welcome-intro-copy p {
  max-width: 330px;
  margin-top: 8px;
  color: rgba(255,255,255,.82);
  font-size: 15px;
  line-height: 1.45;
}
.intro-enter {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #d8b044, #f7df83);
  color: #0f1a4a;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(216,176,68,.22);
}
.intro-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  animation: introRise .7s ease both;
}
.intro-logo {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 34px;
  background: #0f1a4a;
  box-shadow: 0 22px 55px rgba(0,0,0,.30), 0 0 0 1px rgba(255,255,255,.14);
}
.intro-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.intro-content h1 {
  margin-top: 24px;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}
.intro-content p {
  max-width: 330px;
  margin-top: 10px;
  color: rgba(255,255,255,.88);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}
.intro-content::after {
  content: "";
  width: 92px;
  height: 3px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #d8b044, transparent);
  opacity: .9;
}
@keyframes introRise {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes introNetworkDrift {
  from { transform: translate(-50%, -50%) rotate(-2deg) scale(.98); opacity: .22; }
  to { transform: translate(-50%, -50%) rotate(2deg) scale(1.04); opacity: .34; }
}
@keyframes introLoadingLine {
  from { transform: translateX(-8%); }
  to { transform: translateX(146%); }
}
@keyframes loginGlow {
  from { opacity: .55; transform: translateX(-4%); }
  to { opacity: .95; transform: translateX(4%); }
}
@keyframes brandSweep {
  0%, 45% { transform: translateX(-120%); }
  70%, 100% { transform: translateX(120%); }
}

#login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(900px 520px at 20% -10%, #1e2a7a 0%, transparent 58%),
    linear-gradient(135deg, #0f1a4a 0%, #2a0f4a 100%);
}
.login-card {
  position: relative;
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow2);
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: -80px -60px auto;
  height: 160px;
  background:
    radial-gradient(circle at 50% 40%, rgba(216,176,68,.18), transparent 44%),
    linear-gradient(90deg, transparent, rgba(30,64,175,.08), transparent);
  pointer-events: none;
  animation: loginGlow 6s ease-in-out infinite alternate;
}
.login-brand {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  overflow: hidden;
  border-radius: 30px;
  background: #0f1a4a;
  box-shadow: 0 14px 34px rgba(15, 26, 74, .22);
}
.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 28%, rgba(255,255,255,.22), transparent 70%);
  transform: translateX(-120%);
  animation: brandSweep 4.8s ease-in-out infinite;
}
.login-brand-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .34;
  filter: saturate(1.08) contrast(1.08);
}
.login-brand img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.login-card > h1,
.login-card > p,
.login-card > div:not(.login-brand) {
  position: relative;
  z-index: 1;
}
.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #d4af37, #f7e27a);
  color: #1a1440;
  font-size: 22px;
  font-weight: 900;
}
.login-card h1 { margin-bottom: 6px; font-size: 25px; text-align: center; }
.login-card p { color: var(--muted); font-size: 14px; line-height: 1.45; margin-bottom: 18px; text-align: center; }
.public-routing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 10px;
}
.public-routing-card,
.public-services-card {
  padding: 11px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fafc;
}
.public-routing-card {
  width: 100%;
  min-height: 96px;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.public-routing-card:active {
  transform: scale(.985);
}
.public-routing-card:focus-visible,
.public-services-card button:focus-visible {
  outline: 3px solid #bfdbfe;
  outline-offset: 2px;
}
.public-routing-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 22px rgba(30, 64, 175, .10);
  background: linear-gradient(145deg, #ffffff, #eff6ff);
}
.public-routing-card span {
  display: block;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.public-routing-card strong,
.public-services-card strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
}
.public-routing-card small,
.public-services-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.public-services-card {
  margin-bottom: 14px;
}
.public-services-card button {
  margin-top: 10px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
@media (max-width: 380px) {
  .public-routing-grid {
    grid-template-columns: 1fr;
  }
  .area-feature {
    display: grid;
    gap: 12px;
  }
  .area-feature button {
    margin-left: 0;
    width: 100%;
  }
  .area-grid {
    grid-template-columns: 1fr;
  }
}
.login-card label { display: block; margin: 12px 0 6px; color: #334155; font-size: 13px; font-weight: 700; }
.login-card input, .login-card select, .chat-input input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  outline: none;
}
.connection-tools input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  outline: none;
}
.connection-tools input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
.login-card input:focus, .login-card select:focus, .chat-input input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
.field-helper {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  margin-top: 7px;
  margin-right: 6px;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}
.field-helper.icon-helper { min-width: 0; }
.field-helper:disabled { opacity: .65; }
.field-helper.ghost {
  background: #fff;
  border-color: #dbe3ef;
  color: #334155;
}
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 16px 0 12px;
  padding: 5px;
  border-radius: 14px;
  background: #f1f5f9;
}
.auth-tabs button {
  min-width: 0;
  padding: 11px 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}
/* Letras maiores nas telas de login / cadastro / esqueci senha */
.auth-panel label { font-size: 15px; font-weight: 700; }
.auth-panel input, .auth-panel select { font-size: 16px; }
#login-button, #register-button, #recover-button { font-size: 17px !important; padding: 15px !important; font-weight: 800 !important; }
.auth-panel .link-button, .auth-panel .ghost-link { font-size: 15px; }
.auth-tabs button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(2,6,23,.06);
}
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.form-section-label {
  margin: 14px 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.form-grid {
  display: grid;
  gap: 10px;
}
.form-grid.two {
  grid-template-columns: 1fr 92px;
}
.form-grid.two > div { min-width: 0; }
.form-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.conditional-input {
  margin-top: 8px;
}
.auth-feedback {
  margin-top: 14px;
  padding: 16px 16px 16px 18px;
  border: 2px solid #7cc4fb;
  border-left: 6px solid #2563eb;
  border-radius: 14px;
  background: #eef5ff;
  color: #0f2c61;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-line;
  box-shadow: 0 6px 18px rgba(37,99,235,.14);
}
.auth-feedback.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.login-help {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  padding-bottom: calc(84px + var(--safe-bottom));
  background:
    radial-gradient(800px 380px at 18% -22%, rgba(30, 42, 122, .16) 0%, transparent 58%),
    var(--bg);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  max-width: 480px;
  min-height: 76px;
  margin: 0 auto;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  background:
    linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border-bottom: 1px solid #dbe4f0;
  box-shadow: 0 8px 24px rgba(15,23,42,.07);
}
.header::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), #d8b044);
}
.header h1 { text-align: left; font-size: 23px; line-height: 1.15; }
.header-simple { display: block; padding-top: calc(12px + var(--safe-top)); }
.header-simple h1 { text-align: left; padding: 8px 0; line-height: 1.15; }
.header-simple span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-page-header {
  min-height: 84px;
  padding-top: calc(14px + var(--safe-top));
  background:
    radial-gradient(240px 90px at 86% 20%, rgba(30,64,175,.10), transparent 68%),
    linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}
.admin-page-header h1 {
  color: var(--primary-dark);
  font-size: 23px;
}
.app-brand-title {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 10px;
}
.app-brand-title img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(15,26,74,.18);
}
.app-brand-title div {
  min-width: 0;
}
.app-brand-title span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.back-button, .mini-user {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
}
.back-button svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.back-button.ghost {
  visibility: hidden;
  pointer-events: none;
}
.mini-user {
  border-radius: 50%;
  background: #eef2ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
}
.mini-user img,
.avatar img,
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.container { max-width: 480px; margin: 0 auto; padding: 16px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}
.section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, #c7d2fe, transparent);
}
.onboarding-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  background: #eef2ff;
  color: #1e3a8a;
}
.onboarding-card div { flex: 1; min-width: 0; }
.onboarding-card strong { display: block; margin-bottom: 4px; font-size: 14px; }
.onboarding-card span { display: block; font-size: 12px; line-height: 1.35; }
.step-list {
  display: grid !important;
  gap: 2px;
}
.step-list em {
  display: block;
  color: #1e3a8a;
  font-style: normal;
}
.onboarding-card button {
  flex: 0 0 auto;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.card {
  margin-bottom: 16px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.slim-card { padding: 16px; }
.card-title { margin-bottom: 12px; font-size: 16px; }

.company-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #fff;
  font-weight: 900;
  overflow: hidden;
}
.company-text { flex: 1; min-width: 0; overflow: hidden; }
.company-text h3 { font-size: 17px; line-height: 1.2; }
.company-text p { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.badge.associado, .badge.segment { background: #e0f2fe; color: #0369a1; }
.badge.verificado { background: #dcfce7; color: #15803d; }
.badge.score { background: #eef2ff; color: var(--primary); }
.badge.warn { background: #fef3c7; color: #92400e; }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}
.metric-value { color: var(--primary-dark); font-size: 20px; font-weight: 800; text-align: center; }
.metric-label { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: center; text-transform: uppercase; }

.match-grid, .profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.info-tile {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.info-tile strong { display: block; margin-bottom: 4px; font-size: 12px; }
.info-tile span { color: var(--muted); font-size: 12px; line-height: 1.3; }
.service-shortcuts { margin-bottom: 12px; }
.service-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
  overflow: hidden;
}
.service-card {
  width: 100%;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dbe4f0;
  border-left: 4px solid #bfdbfe;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15,23,42,.04);
}
.service-card > span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
}
.service-card strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 15px;
}
.service-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.service-contact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 8px;
  margin-top: 10px;
  width: 100%;
  overflow: visible;
}
.service-contact-row button {
  min-width: 0;
  width: 100%;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  overflow: hidden;
}
.service-contact-row button:active { transform: translateY(1px); }
.service-contact-row small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acicg-area {
  display: grid;
  gap: 12px;
}
.area-feature {
  min-height: 150px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 16px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    radial-gradient(180px 110px at 88% 8%, rgba(34,197,94,.22), transparent 66%),
    linear-gradient(135deg, #071f4f 0%, #1d4ed8 62%, #0f1a4a 100%);
}
.area-feature::before {
  content: "";
  position: absolute;
  inset: auto 16px 16px auto;
  width: 64px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, rgba(255,255,255,.65));
  box-shadow: none;
}
.area-feature > div,
.area-feature button {
  position: relative;
  z-index: 1;
}
.area-feature span,
.area-card span {
  display: block;
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.area-feature strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
}
.area-feature p {
  max-width: 310px;
  margin-top: 6px;
  color: rgba(255,255,255,.86);
  font-size: 12px;
  line-height: 1.4;
}
.area-feature button {
  flex: 0 0 auto;
  align-self: flex-end;
  margin-left: auto;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.area-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  text-align: left;
}
.area-card strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 12px;
}
.area-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.area-card.event-card {
  border-color: #bfdbfe;
  background:
    radial-gradient(120px 80px at 100% 0%, rgba(34,197,94,.13), transparent 70%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}
.event-highlight {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background:
    radial-gradient(160px 90px at 95% 0%, rgba(22,163,74,.16), transparent 68%),
    linear-gradient(135deg, #eef6ff, #ffffff);
  box-shadow: 0 8px 22px rgba(15,44,97,.07);
}
.event-highlight span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.event-highlight strong {
  display: block;
  margin-top: 7px;
  color: var(--primary-dark);
  font-size: 15px;
}
.event-highlight p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.event-highlight button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(30,64,175,.22);
}
.media-grid {
  display: grid;
  gap: 10px;
}
.media-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 20px rgba(15,44,97,.07);
}
.media-card span {
  display: block;
  color: var(--primary);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.media-card strong {
  display: block;
  margin-top: 3px;
  color: var(--primary-dark);
  font-size: 14px;
}
.media-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.media-card video {
  width: 100%;
  max-height: 210px;
  border-radius: 14px;
  background: #0f1a4a;
}

.btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0;
  font-size: 15px;
  font-weight: 800;
}
.btn-primary { margin-top: 14px; background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(30,64,175,.24); }
.btn-whatsapp { background: var(--success); color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,.24); }
/* WhatsApp secundário: o CTA principal é "Conectar via App" (o intuito é usar o
   app). O WhatsApp fica em estilo contorno, mais discreto — mas continua ali. */
.btn-like.whatsapp, .discovery-primary-actions .whatsapp {
  background: transparent !important; color: #35d07f !important;
  border: 1px solid rgba(37,211,102,.45) !important; box-shadow: none !important;
}
.btn-like.whatsapp .deck-action-icon, .discovery-primary-actions .whatsapp .deck-action-icon {
  background: rgba(37,211,102,.16) !important; color: #35d07f !important;
}
.discovery-primary-actions .app { box-shadow: 0 8px 20px rgba(29,78,216,.42) !important; }
/* Botão WhatsApp no detalhe da empresa: contorno em vez de verde sólido. */
.company-item .btn-whatsapp, .btn-whatsapp.secundario {
  background: transparent !important; color: #1f9e5f !important;
  border: 1px solid rgba(37,211,102,.5) !important; box-shadow: none !important;
}
.btn-secondary { border: 1px solid #e2e8f0; background: #fff; color: #334155; }
.demo-link { width: 100%; margin-top: 8px; padding: 11px; border: 0; background: transparent; color: var(--primary); font-weight: 800; }
.secondary-row { display: flex; gap: 8px; margin-top: 8px; }
.secondary-row .btn { flex: 1; }

.priority-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  line-height: 1.4;
}
.match-link {
  display: block;
  width: 100%;
  padding: 12px 0 16px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
}

.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.filter-row button, .quick-replies button, .lia-actions button {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.filter-row button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.company-list { display: grid; gap: 10px; }
.match-deck .company-head { margin-bottom: 10px; }
.deck-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.deck-actions button {
  min-height: 46px;
  border-radius: 999px;
  font-weight: 900;
}
.btn-pass { border: 1px solid #e2e8f0; background: #fff; color: #475569; }
.btn-like { border: 0; background: var(--success); color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,.24); }
.company-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(2,6,23,.04);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.company-item.expanded {
  border-color: #c7d2fe;
  box-shadow: var(--shadow);
}
.focus-pulse {
  animation: focusPulse .42s ease both;
}
@keyframes focusPulse {
  0% { transform: scale(.992); }
  55% { transform: scale(1.006); }
  100% { transform: scale(1); }
}
.company-item-top { display: flex; gap: 10px; align-items: center; }
.company-item h3 { font-size: 15px; }
.company-item p { margin-top: 2px; color: var(--muted); font-size: 12px; }
.company-meta-table {
  display: grid;
  margin-top: 12px;
  border: 1px solid #e7edf5;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}
.company-meta-table div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-top: 1px solid #e7edf5;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.company-meta-table div:first-child { border-top: 0; }
.company-meta-table dt {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}
.company-meta-table dt i {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  font-style: normal;
}
.company-meta-table dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #475569;
}
.demo-data-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  color: #64748b;
  font-size: 11px;
}
.demo-data-note strong { color: var(--primary); }
.company-reason { margin-top: 10px; color: #334155; font-size: 12px; line-height: 1.35; }
.match-link.inline {
  padding: 10px 0 2px;
}

.empty-state {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #fbfdff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.connection-tools {
  position: sticky;
  top: 72px;
  z-index: 8;
  padding: 14px;
}
.connection-tools label {
  display: block;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.connection-tools input,
.connection-tools select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  outline: none;
}
.connection-tools input:focus,
.connection-tools select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px #dbeafe;
}
.connection-select-row {
  margin-top: 10px;
}
.connection-filter-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.connection-filter-row button {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
.connection-filter-row button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.connection-card {
  cursor: pointer;
}
.connection-card.expanded {
  border-color: #c7d2fe;
  box-shadow: var(--shadow2);
}
.connection-compact {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #f8fafc;
}
.connection-compact strong {
  display: block;
  color: #0f172a;
  font-size: 12px;
}
.connection-compact span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.connection-summary {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}
.status-pill.fechado, .status-pill.proposta, .status-pill.respondida { background: #dcfce7; color: #166534; }
.status-pill.contrato { background: #fef3c7; color: #92400e; }
.status-pill.reuniao { background: #e0f2fe; color: #0369a1; }
.status-pill.conversa, .status-pill.match, .status-pill.conexao, .status-pill.interesse,
.status-pill.visualizada, .status-pill.entregue, .status-pill.enviada { background: #eef2ff; color: var(--primary); }

.timeline { display: grid; gap: 12px; margin: 14px 0; }
.timeline-step { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: #94a3b8; }
.timeline-step > span {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
}
.timeline-step.active > span { border-color: var(--success); background: var(--success); box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.timeline-step strong { display: block; color: #334155; font-size: 14px; }
.timeline-step.active strong { color: var(--ink); }
.timeline-step p { margin-top: 3px; font-size: 12px; line-height: 1.35; }

.tracker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 12px 0;
}
.tracker-field {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfdff;
}
.tracker-field strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 12px;
}
.tracker-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.stage-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.stage-actions button {
  min-height: 40px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.task-list { display: grid; gap: 9px; }
.task-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.task-list strong { display: block; margin-bottom: 3px; font-size: 13px; }
.task-list span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.edit-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0;
  padding: 5px;
  border-radius: 14px;
  background: #f1f5f9;
}
.edit-tabs button {
  padding: 9px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.edit-tabs button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(2,6,23,.06);
}
.profile-form { display: grid; gap: 10px; }
.profile-form label { color: #334155; font-size: 12px; font-weight: 900; }
.profile-form input, .profile-form textarea, .profile-form select {
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  outline: none;
}
.profile-form textarea { min-height: 82px; resize: vertical; }
.logo-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #fbfdff;
}
.logo-preview {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #fff;
  font-weight: 900;
  overflow: hidden;
}
.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: -4px -4px 16px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, #0f1a4a 0%, #1e40af 70%, #2247b8 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(15,26,74,.18);
}
.admin-head span:first-child,
.admin-section-title {
  display: block;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-head span:first-child {
  color: rgba(255,255,255,.88);
  font-weight: 700;
}
.admin-head h3 {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.15;
}
.admin-head p {
  margin-top: 4px;
  color: rgba(255,255,255,.95);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.admin-head .status-pill {
  background: rgba(220,252,231,.95);
  color: #166534;
}
.admin-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
}
.admin-sync-bar.online {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.admin-sync-bar strong,
.admin-sync-bar span {
  display: block;
}
.admin-sync-bar strong {
  color: #991b1b;
  font-size: 12px;
}
.admin-sync-bar.online strong {
  color: #166534;
}
.admin-sync-bar span {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}
.admin-sync-bar button {
  flex: 0 0 auto;
  max-width: 116px;
  padding: 8px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}
.admin-debug-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: -4px 0 12px;
  padding-bottom: 4px;
}
.admin-debug-strip span {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}
.admin-section-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 3px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fbff, #eef4ff);
}
.admin-section-nav button {
  min-width: 0;
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 8px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: #475569;
  font-size: 10px;
  font-weight: 900;
}
.admin-section-nav button i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8efff;
  color: #1d4ed8;
  font-style: normal;
}
.admin-section-nav button i::before { font-size: 14px; line-height: 1; }
.admin-section-nav button[data-admin-icon] i::before { font-style: normal; font-size: 18px; line-height: 1; }
.admin-section-nav button[data-admin-icon="dashboard"] i::before { content: "📊"; }
.admin-section-nav button[data-admin-icon="avisos"] i::before { content: "🔔"; }
.admin-section-nav button[data-admin-icon="agenda"] i::before { content: "📅"; }
.admin-section-nav button[data-admin-icon="empresas"] i::before { content: "🏢"; }
.admin-section-nav button[data-admin-icon="gestao"] i::before { content: "🏅"; }
.admin-section-nav button[data-admin-icon="usuarios"] i::before { content: "👥"; }
.admin-section-nav button[data-admin-icon="conexoes"] i::before { content: "🤝"; }
.admin-section-nav button[data-admin-icon="chat"] i::before { content: "💬"; }
.admin-section-nav button[data-admin-icon="relatorios"] i::before { content: "📄"; }
.admin-section-nav button[data-admin-icon="patrocinadores"] i::before { content: "📣"; }
.admin-section-nav button[data-admin-icon="manutencao"] i::before { content: "🧹"; }
.admin-section-nav button[data-admin-icon="configuracoes"] i::before { content: "⚙️"; }
.admin-section-nav button.active {
  border-color: #1d4ed8;
  background: linear-gradient(145deg, #0f2c61, #234bc1);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15,44,97,.18);
}
.admin-section-nav button.active i {
  background: rgba(255,255,255,.16);
  color: #fff;
}
.admin-mobile-nav { display: none; }
.admin-support-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f4f8ff);
}
.admin-support-card strong {
  color: #0f2c61;
  font-size: 16px;
}
.admin-support-card span {
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
[data-admin-group][hidden] { display: none !important; }
.admin-operations-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #cfe0f7;
  border-radius: 18px;
  background: linear-gradient(155deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 10px 24px rgba(15,44,97,.08);
}
.admin-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-panel-heading > div { min-width: 0; }
.admin-panel-heading span,
.admin-panel-heading h3,
.admin-panel-heading p {
  display: block;
  margin: 0;
}
.admin-panel-heading span {
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-panel-heading h3 {
  margin-top: 4px;
  color: #0f2c61;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.2px;
}
.admin-panel-heading p {
  margin-top: 6px;
  color: #52627a;
  font-size: 13px;
  line-height: 1.45;
}
.admin-panel-heading > b {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  white-space: nowrap;
}
.admin-operations-kpis,
.admin-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.admin-operations-kpis > div,
.admin-report-summary-grid > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
}
.admin-operations-kpis strong,
.admin-operations-kpis span,
.admin-operations-kpis small,
.admin-report-summary-grid strong,
.admin-report-summary-grid span {
  display: block;
}
.admin-operations-kpis strong,
.admin-report-summary-grid strong {
  color: #0f2c61;
  font-size: 22px;
  line-height: 1;
}
.admin-operations-kpis span,
.admin-report-summary-grid span {
  margin-top: 7px;
  color: #243b61;
  font-size: 11px;
  font-weight: 900;
}
.admin-operations-kpis small {
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.3;
}
.admin-panel-subhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}
.admin-panel-subhead strong {
  color: #0f2c61;
  font-size: 14px;
}
.admin-panel-subhead span {
  color: #64748b;
  font-size: 10px;
  text-align: right;
}
.admin-conversation-list,
.admin-feedback-list {
  display: grid;
  gap: 8px;
}
.admin-conversation-row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dbe7f5;
  border-radius: 13px;
  background: #fff;
  color: inherit;
  text-align: left;
}
.admin-conversation-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #1d4ed8, #0f2c61);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}
.admin-conversation-row > span:nth-child(2) { min-width: 0; }
.admin-conversation-row strong,
.admin-conversation-row small {
  display: block;
}
.admin-conversation-row strong {
  color: #17233d;
  font-size: 12px;
}
.admin-conversation-row small {
  overflow: hidden;
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-conversation-row em {
  color: #64748b;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}
.admin-insight-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 13px;
  background: #eff6ff;
}
.admin-insight-note b {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 7px;
  background: #0f2c61;
  color: #fff;
  font-size: 9px;
}
.admin-insight-note span {
  color: #334e75;
  font-size: 11px;
  line-height: 1.45;
}
.admin-report-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 4px;
  border-radius: 13px;
  background: #eaf1fb;
}
.admin-report-tabs button {
  min-height: 38px;
  padding: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #52627a;
  font-size: 10px;
  font-weight: 900;
}
.admin-report-tabs button.active {
  background: #0f2c61;
  color: #fff;
  box-shadow: 0 5px 13px rgba(15,44,97,.20);
}
.admin-report-preview {
  display: grid;
  gap: 12px;
  min-height: 220px;
}
.admin-report-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 15px;
  background: linear-gradient(135deg, #0f2c61, #1d4ed8);
  color: #fff;
}
.admin-report-hero.feedback {
  background: linear-gradient(135deg, #123869, #0f766e);
}
.admin-report-hero span,
.admin-report-hero strong,
.admin-report-hero small {
  display: block;
}
.admin-report-hero span {
  color: #bfdbfe;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.admin-report-hero strong {
  margin-top: 4px;
  font-size: 32px;
  line-height: 1;
}
.admin-report-hero small {
  margin-top: 5px;
  color: #dbeafe;
  font-size: 10px;
}
.admin-report-hero > b {
  min-width: 76px;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 13px;
  background: rgba(255,255,255,.10);
  font-size: 21px;
  text-align: center;
}
.admin-report-hero > b small {
  color: #dbeafe;
  font-size: 9px;
  font-weight: 700;
}
.admin-report-bars {
  display: grid;
  gap: 9px;
}
.admin-report-bar {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1.5fr) 24px;
  align-items: center;
  gap: 8px;
}
.admin-report-bar span {
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}
.admin-report-bar i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe5f1;
}
.admin-report-bar i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, #16a34a);
}
.admin-report-bar > strong {
  color: #0f2c61;
  font-size: 11px;
  text-align: right;
}
.admin-feedback-row {
  display: grid;
  gap: 4px;
  padding: 11px;
  border-left: 3px solid #16a34a;
  border-radius: 0 11px 11px 0;
  background: #fff;
}
.admin-feedback-row b {
  color: #17233d;
  font-size: 11px;
}
.admin-feedback-row span {
  color: #475569;
  font-size: 11px;
  line-height: 1.4;
}
.admin-feedback-row em {
  color: #64748b;
  font-size: 9px;
  font-style: normal;
}
.admin-report-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.admin-report-actions button {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 11px;
  background: #fff;
  color: #0f2c61;
  font-size: 11px;
  font-weight: 900;
}
.admin-dashboard {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.admin-dashboard-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef5ff 0%, #fff 68%);
}
.admin-dashboard-summary > div { min-width: 0; }
.admin-dashboard-summary span,
.admin-dashboard-summary strong,
.admin-dashboard-summary small {
  display: block;
}
.admin-dashboard-summary span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.admin-dashboard-summary strong {
  margin-top: 3px;
  color: var(--primary-dark);
  font-size: 17px;
}
.admin-dashboard-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.admin-dashboard-summary > b {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 10px;
  white-space: nowrap;
}
.admin-dashboard-summary > b.attention { background: #fef3c7; color: #92400e; }
.admin-dashboard-summary > b.healthy { background: #dcfce7; color: #166534; }
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.admin-metrics div {
  min-width: 0;
  padding: 13px 12px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 4px 14px rgba(15,23,42,.045);
  text-align: left;
}
.admin-metrics strong {
  display: block;
  color: var(--primary-dark);
  font-size: 24px;
  line-height: 1;
}
.admin-metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: normal;
}
.admin-metrics small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.25;
}
body[data-theme="dark"] .admin-metrics div {
  background: var(--card);
  border-color: var(--line);
  box-shadow: none;
}
body[data-theme="dark"] .admin-metrics strong { color: var(--ink); }
body[data-theme="dark"] .admin-metrics span { color: #9db8db; }
body[data-theme="dark"] .admin-metrics small { color: var(--muted); }

/* Correções de contraste — tema escuro (Perfil + Admin) */
body[data-theme="dark"] .edit-tabs { background: var(--card); border: 1px solid var(--line); }
body[data-theme="dark"] .edit-tabs button { background: transparent; color: var(--muted); }
body[data-theme="dark"] .edit-tabs button.active { background: var(--primary); color: #fff; }
body[data-theme="dark"] .logo-picker { background: var(--card); border-color: var(--line); }
body[data-theme="dark"] .logo-picker small { color: var(--muted); }
body[data-theme="dark"] .form-section-label { color: var(--ink); }
body[data-theme="dark"] .profile-form > label,
body[data-theme="dark"] .profile-form label { color: #cdddf2; }
body[data-theme="dark"] .info-tile span { color: #cdddf2; }
body[data-theme="dark"] .info-tile strong { color: var(--ink); }
body[data-theme="dark"] .admin-dashboard-progress { background: var(--card); border-color: var(--line); }
body[data-theme="dark"] .admin-dashboard-progress strong { color: var(--ink); }
body[data-theme="dark"] .admin-dashboard-progress span,
body[data-theme="dark"] .admin-dashboard-progress b { color: #cdddf2; }
body[data-theme="dark"] .admin-dashboard-actions button { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
/* Toast/notificação no tema escuro */
body[data-theme="dark"] .app-toast { background: var(--card); border-color: var(--line); color: var(--ink); box-shadow: 0 18px 44px rgba(0,0,0,.5); }
body[data-theme="dark"] .app-toast strong { color: var(--ink); }
body[data-theme="dark"] .app-toast span { color: #cdddf2; }
.admin-dashboard-priorities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.admin-dashboard-priority {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 13px;
  background: #f8fbff;
}
.admin-dashboard-priority span,
.admin-dashboard-priority strong,
.admin-dashboard-priority small {
  display: block;
}
.admin-dashboard-priority span {
  color: #475569;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}
.admin-dashboard-priority strong {
  margin-top: 5px;
  color: var(--primary-dark);
  font-size: 20px;
}
.admin-dashboard-priority small {
  margin-top: 3px;
  color: #64748b;
  font-size: 9px;
  line-height: 1.25;
}
.admin-dashboard-priority.warning { border-color: #fde68a; background: #fffbeb; }
.admin-dashboard-priority.danger { border-color: #fecaca; background: #fef2f2; }
.admin-dashboard-priority.ok { border-color: #bbf7d0; background: #f0fdf4; }
.admin-dashboard-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
}
.admin-dashboard-progress strong,
.admin-dashboard-progress span { display: block; }
.admin-dashboard-progress strong { color: var(--primary-dark); font-size: 12px; }
.admin-dashboard-progress span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.admin-dashboard-progress > b { color: var(--primary); font-size: 17px; }
.admin-dashboard-progress > i {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.admin-dashboard-progress > i span {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1e40af, #2563eb, #16a34a);
}
.admin-dashboard-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.admin-dashboard-actions button {
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  border: 1px solid #c7d2fe;
  border-radius: 11px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
}
.admin-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  color: var(--primary-dark);
  font-size: 12px;
}
.admin-section-title::before {
  content: "";
  width: 4px;
  height: 17px;
  flex: 0 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}
.admin-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, #c7d2fe, transparent);
}
.admin-list, .admin-process-list {
  display: grid;
  gap: 10px;
}
.admin-row, .admin-process {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15,23,42,.04);
}
.admin-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-card-top > div {
  min-width: 0;
}
.admin-row strong, .admin-process strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
}
.admin-row span, .admin-process span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.admin-row em, .admin-process em {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
}
.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}
.admin-card-top b {
  flex: 0 0 auto;
  max-width: 128px;
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-card-top b.pending { background: #fef3c7; color: #92400e; }
.admin-card-top b.paused { background: #fee2e2; color: #991b1b; }
.admin-row-actions button {
  min-height: 34px;
  flex: 1 1 78px;
  padding: 7px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}
.admin-row-actions button[data-admin-delete],
.admin-row-actions button[data-register-block] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.admin-row-actions button[data-register-approve] {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}
.admin-action-explanation {
  padding: 9px 10px;
  border-left: 3px solid #93c5fd;
  border-radius: 8px;
  background: #f8fbff;
  color: #64748b;
  font-size: 10px;
  line-height: 1.4;
}
.admin-action-explanation strong {
  display: inline;
  color: #334155;
  font-size: inherit;
}

@media (max-width: 380px) {
  .admin-dashboard-priorities,
  .admin-dashboard-actions {
    grid-template-columns: 1fr;
  }
  .admin-dashboard-priority {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 8px;
  }
  .admin-dashboard-priority strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }
}
.logo-picker button {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
}
.logo-picker small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.chat-card { padding: 14px; padding-bottom: 12px; }
.chat-card .company-head {
  gap: 10px;
  margin-bottom: 10px;
}
.chat-card .avatar,
.chat-card .company-logo-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 13px;
}
.chat-card .company-text h3 {
  font-size: 17px;
  line-height: 1.18;
}
.chat-card .company-text p {
  font-size: 12px;
  line-height: 1.35;
}
.chat-inbox {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}
.inbox-title {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.conversation-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.conversation-item.active {
  border-color: #c7d2fe;
  background: #eef2ff;
}
.small-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
  font-size: 12px;
}
.conversation-item strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
}
.conversation-item > span:not(.avatar) { min-width: 0; }
.conversation-item em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-item b {
  justify-self: end;
  max-width: 96px;
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--primary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-thread {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 220px;
  max-height: min(360px, 42vh);
  overflow-y: auto;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  animation: panelIn .22s ease both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-assist {
  margin: 8px 0 10px;
  padding: 9px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  background: linear-gradient(180deg, #eef2ff, #fff);
}
/* CORRECAO LIA v82: painel em FLUXO (nao mais overlay). Fica abaixo das
   mensagens e acima do input, sem cobrir a conversa. O card vira coluna flex
   (ver has-open-chat .chat-card) e a thread encolhe pra abrir espaco. */
.tab-panel[data-panel="chat"].has-open-chat .chat-assist.chat-assist-open {
  flex: 0 0 auto;
  margin: 8px 0 6px;
  max-height: 40vh;
  overflow-y: auto;
  box-shadow: 0 -2px 12px rgba(15,44,97,.08);
}
.chat-assist-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.chat-assist-title strong {
  color: var(--primary-dark);
  font-size: 13px;
}
.chat-assist-title span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
}
.chat-assist p {
  margin-top: 7px;
  color: #334155;
  font-size: 12px;
  line-height: 1.38;
}
.chat-assist-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.chat-assist button,
.chat-assist-actions button {
  min-height: 36px;
  border: 1px solid #c7d2fe;
  border-radius: 11px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}
.chat-line { display: flex; align-items: flex-start; }
.chat-line.mine { justify-content: flex-end; }
.chat-bubble {
  max-width: 78%;
  padding: 10px 11px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: #0f172a;
  font-size: 13px;
  line-height: 1.4;
}
.chat-line.mine .chat-bubble { background: var(--primary); color: #fff; border-color: var(--primary); border-top-right-radius: 5px; }
.chat-line.theirs .chat-bubble { border-top-left-radius: 5px; }
.chat-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(148,163,184,.2);
  font-size: 9px;
}
.chat-message-meta strong { min-width: 0; overflow-wrap: anywhere; }
.chat-message-meta span { opacity: .72; text-align: right; }
.chat-line.mine .chat-message-meta { border-bottom-color: rgba(255,255,255,.2); }
.chat-message-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-whatsapp-action {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #86efac;
  border-radius: 12px;
  background: #dcfce7;
  color: #166534;
  text-decoration: none;
}
.chat-whatsapp-action strong { font-size: 12px; }
.chat-whatsapp-action span { font-size: 10px; }
.chat-attachments {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.chat-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.24);
  font-size: 12px;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
}
a.chat-file::after {
  content: "Baixar";
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  color: inherit;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}
.chat-file small {
  grid-column: 1 / -1;
  color: inherit;
  font-size: 9px;
  font-weight: 900;
  opacity: .72;
  text-transform: uppercase;
}
.chat-line.theirs .chat-file {
  background: #f1f5f9;
  border-color: var(--line);
}
.chat-line.theirs a.chat-file::after { background: #e0f2fe; color: #075985; }
.chat-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-size: 10px; opacity: .8; text-transform: uppercase; }
.chat-media {
  display: grid;
  gap: 8px;
  max-width: min(100%, 320px);
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22);
}
.chat-line.theirs .chat-media {
  background: #f8fafc;
  border-color: var(--line);
}
.chat-media img,
.chat-media video {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(15, 23, 42, .12);
}
/* CORRECAO: imagem clicável para lightbox */
img.chat-img-preview {
  cursor: zoom-in;
  max-height: 240px;
  object-fit: contain;
}
.chat-media audio {
  width: 100%;
  min-width: 0;
}
.chat-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.chat-file-row span,
.chat-file-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-file-row span {
  font-size: 12px;
  font-weight: 900;
}
.chat-file-row em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  opacity: .78;
  text-transform: uppercase;
}
.chat-file-download {
  grid-row: 1 / span 2;
  grid-column: 2;
  padding: 6px 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  color: inherit;
  font-size: 10px;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.chat-line.theirs .chat-file-download {
  background: #e0f2fe;
  color: #075985;
}
.chat-media small {
  color: inherit;
  font-size: 9px;
  font-weight: 900;
  opacity: .72;
  text-transform: uppercase;
}
.delivery-proof {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.22);
  font-size: 10px;
  font-weight: 800;
  opacity: .86;
}
.message-status {
  margin-top: 6px;
  font-size: 10px;
  opacity: .72;
  text-align: right;
}
.message-status.ticks {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  min-width: 24px;
  height: 14px;
  margin-top: 5px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  opacity: 1;
  user-select: none;
  float: right;
}
.message-status.ticks span + span {
  margin-left: -5px;
}
.message-status.ticks.delivered {
  color: rgba(255,255,255,.88);
}
.message-status.ticks.read {
  color: #7dd3fc;
  filter: drop-shadow(0 0 5px rgba(147,197,253,.35));
}
.quick-replies { display: none !important; }
.attachment-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fbfdff;
}
.attachment-bar button {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
.attachment-bar span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 88px;
  gap: 8px;
  align-items: stretch;
}
.chat-input input {
  min-width: 0;
  height: 52px;
  padding: 0 12px;
}
.chat-input button {
  min-width: 0;
  height: 52px;
  padding: 0 10px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  max-width: 480px;
  min-height: calc(68px + var(--safe-bottom));
  margin: 0 auto;
  padding: 8px 10px calc(8px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(15,23,42,.06);
}
.bottom-nav.dashboard-visible { grid-template-columns: repeat(6, 1fr); }
.bottom-nav.admin-visible { grid-template-columns: repeat(6, 1fr); }
.bottom-nav.dashboard-visible.admin-visible { grid-template-columns: repeat(7, 1fr); }
.nav-item {
  min-width: 0;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}
.nav-item svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Animação suave da barra de menu (inspirada no Interactive Grid Originkit) ──
   O ícone da aba ativa cresce, sobe um pouco e ganha um brilho macio; ao tocar,
   afunda de leve para dar resposta. Transições curtas (200–280ms) com curva
   suave — nada de exagero. */
.nav-item svg { transition: transform 280ms cubic-bezier(.22,1,.36,1), filter 280ms ease; will-change: transform; }
.nav-item span { transition: opacity 200ms ease, transform 280ms cubic-bezier(.22,1,.36,1); }
.nav-item:active svg { transform: scale(.88); }              /* feedback do toque */
.nav-item.active svg {
  transform: scale(1.18) translateY(-3px);
  filter: drop-shadow(0 4px 9px rgba(58,123,189,.55));
}
.nav-item.active span { transform: translateY(-1px); }
/* Brilho macio pulsando atrás do ícone ativo (bem sutil). */
.nav-item.active { position: relative; }
.nav-item.active::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 34px; height: 34px;
  transform: translateX(-50%); border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(58,123,189,.38), transparent 70%);
  animation: navGlow 2.4s ease-in-out infinite;
}
@keyframes navGlow { 0%,100% { opacity:.35; transform:translateX(-50%) scale(.85); } 50% { opacity:.7; transform:translateX(-50%) scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  .nav-item svg, .nav-item span { transition: none; }
  .nav-item.active::before { animation: none; }
}

/* === Patrocinadores ACICG === */
.sponsors-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  padding: 4px 2px 10px;
  letter-spacing: .2px;
}
.sponsors-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.sponsors-grid::-webkit-scrollbar { height: 0; }
.sponsor-card {
  flex: 0 0 auto;
  width: 215px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.sponsor-avatar {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  flex-shrink: 0;
}
/* Patrocinador: carrossel compacto com logo (rotacao automatica) */
#homeSponsorsCard { padding: 12px 14px; }
#homeSponsorsCard .sponsors-section-title { margin-bottom: 8px; }
.sponsor-rotator { position: relative; min-height: 80px; }
.sponsor-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 14px;
  opacity: 0; transform: translateX(10px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.sponsor-slide.on { position: relative; opacity: 1; transform: none; pointer-events: auto; }
.sponsor-logo-img {
  width: 80px; height: 80px; border-radius: 16px;
  object-fit: contain; background: #fff; padding: 6px; flex-shrink: 0;
}
.sponsor-slide-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.sponsor-slide-info strong { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.sponsor-slide-info span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.sponsor-slide-info .btn-sponsor { margin-top: 6px; align-self: flex-start; padding: 6px 18px; border-radius: 9px; }
.sponsor-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }

/* ── Patrocinador PREMIUM (cota de receita) — miniatura compacta + selo ──── */
/* Limita à coluna do app (senão no desktop fica gigante) e usa miniatura pequena. */
#homeSponsorsCard { max-width: 480px; margin-left: auto; margin-right: auto;
  border: 1px solid rgba(242,208,137,.34) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.30), inset 0 0 0 1px rgba(242,208,137,.06); }
.sponsors-section-title { color: #f2d089 !important; font-weight: 900; letter-spacing: .02em; }
.sponsor-rotator { min-height: 96px; }
/* Layout compacto: thumbnail pequeno à esquerda, informações à direita. */
.sponsor-slide.premium { flex-direction: row; align-items: center; gap: 12px; }
.sp-media { position: relative; flex: 0 0 132px; width: 132px; aspect-ratio: 16/9;
  border-radius: 12px; overflow: hidden; background: #0c1e3a; cursor: pointer;
  border: 1px solid rgba(242,208,137,.4); box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.sp-media img, .sp-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-media-logo { display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg,#12315a,#0b1e38); cursor: default; }
.sp-logo-big { max-width: 78%; max-height: 78%; object-fit: contain; background: transparent; }
.sp-logo-fallback { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 24px; font-weight: 900; }
.sp-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; background: rgba(242,208,137,.96);
  box-shadow: 0 4px 14px rgba(0,0,0,.55); transition: transform .15s ease; }
.sp-media:hover .sp-play { transform: translate(-50%,-50%) scale(1.1); }
.sp-play::after { content: ""; position: absolute; top: 50%; left: 56%; transform: translate(-50%,-50%);
  border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #0d1a31; }
.sp-selo { position: absolute; bottom: 5px; left: 5px; z-index: 3; font-size: 7.5px; font-weight: 900;
  letter-spacing: .02em; color: #f2d089; background: linear-gradient(135deg,#0b2e52,#0d1a31);
  padding: 2px 6px; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.6);
  border: 1px solid rgba(242,208,137,.7); white-space: nowrap; }
.sponsor-slide.premium .sponsor-slide-info { gap: 2px; }
.sponsor-slide.premium .sponsor-slide-info strong { font-size: 14.5px; }
.sp-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.sponsor-slide.premium .btn-sponsor { margin-top: 0; flex: 0 1 auto; text-align: center;
  padding: 7px 11px; font-size: 12px; font-weight: 800; border-radius: 10px; }
.btn-sponsor.wa { background: #25d366 !important; color: #0b2e17 !important; border-color: #25d366 !important; }
.btn-sponsor.vid { background: rgba(242,208,137,.16) !important; color: #f2d089 !important;
  border: 1px solid rgba(242,208,137,.5) !important; }

.sponsor-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.25); transition: background .3s, width .3s; }
.sponsor-dots span.on { width: 16px; border-radius: 4px; background: var(--primary); }
.sponsor-admin-card .sponsor-logo-img { width: 46px; height: 46px; border-radius: 12px; padding: 4px; }

.sponsor-card strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.sponsor-card span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.btn-sponsor {
  margin-top: 2px;
  align-self: stretch;
  text-align: center;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 10px;
}
/* ===== Aba Patrocinador (admin): formulario + lista ===== */
.sponsor-form {
  display: grid;
  gap: 13px;
  margin: 14px 0 6px;
}
.sponsor-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #a9bdd4;
}
body[data-theme="dark"] .sponsor-form label { color: #cfe0f5; }
.sponsor-form label input,
.sponsor-form label textarea {
  width: 100%;
  box-sizing: border-box;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 13px;
  border-radius: 11px;
  border: 1px solid #d5deeb;
  background: #ffffff;
  color: #16233a;
}
.sponsor-form label input::placeholder,
.sponsor-form label textarea::placeholder { color: #93a6bd; opacity: 1; }
.sponsor-form label input:focus,
.sponsor-form label textarea:focus {
  outline: none; border-color: #f2d089;
  box-shadow: 0 0 0 3px rgba(242,208,137,.22);
}
body[data-theme="dark"] .sponsor-form label input,
body[data-theme="dark"] .sponsor-form label textarea {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(147,197,253,.28);
  color: #eaf2ff;
}
body[data-theme="dark"] .sponsor-form label input::placeholder,
body[data-theme="dark"] .sponsor-form label textarea::placeholder { color: #8aa0b6; }
body[data-theme="dark"] .sponsor-form label input:focus,
body[data-theme="dark"] .sponsor-form label textarea:focus {
  border-color: #f2d089;
  box-shadow: 0 0 0 3px rgba(242,208,137,.25);
}
.sponsor-form input[type="color"] {
  width: 58px;
  height: 44px;
  padding: 3px;
  border-radius: 10px;
  cursor: pointer;
  align-self: flex-start;
}
.sponsor-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}
.sponsor-form-actions .btn {
  flex: 1;
  min-height: 46px;
}
.sponsor-admin-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.sponsor-admin-card .sponsor-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}
.sponsor-info {
  flex: 1 1 0;
  min-width: 0;
}
.sponsor-info strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sponsor-info span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.sponsor-info a {
  color: var(--primary);
  font-size: 12px;
  text-decoration: none;
  word-break: break-all;
}
.sponsor-admin-actions {
  flex: 1 1 100%;
  display: flex;
  gap: 6px;
}
.sponsor-admin-actions button {
  flex: 1;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
}
.sponsor-admin-actions button:hover { background: rgba(127,160,210,.12); }
/* Botao discreto de arquivar conexao (Fase 1b rastreabilidade) */
.stage-actions.archive-row { margin-top: 8px; }
.archive-conn-btn {
  width: 100%;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.archive-conn-btn:hover { color: var(--ink); border-color: var(--ink); }

/* ============================================================
   POLIMENTO VISUAL (redesign Fase 2): tipografia + animacoes
   Regras ADITIVAS no fim do arquivo, sem reescrever as anteriores.
   ============================================================ */

/* 1) Tipografia com mais presenca corporativa */
.section-title { font-size: 17px; letter-spacing: .045em; }
.sponsors-section-title { font-size: 14px; letter-spacing: .04em; }
.company-text h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.company-text p { font-size: 13.5px; }
.feed-video-title { font-weight: 700; }
.discovery-copy h3 { font-size: 20px; font-weight: 800; }

/* 2) Animacoes sutis e profissionais */
@keyframes acFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.tab-panel.active { animation: acFadeUp .28s ease both; }

.card, .info-tile, .sponsor-card, .feed-video-card, .conversation-item,
.connection-card, .discovery-card, .feed-carousel-slide {
  transition: transform .16s ease, box-shadow .18s ease, border-color .16s ease;
}
.feed-video-card:active, .conversation-item:active, .sponsor-card:active,
.connection-card:active { transform: scale(.985); }

@media (hover: hover) {
  .card:hover, .feed-video-card:hover, .sponsor-card:hover,
  .connection-card:hover, .info-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(2, 6, 23, .30);
  }
}

.btn { transition: transform .12s ease, filter .16s ease, background .16s ease, opacity .16s ease; }
.btn:active { transform: scale(.97); }
.nav-item { transition: color .16s ease, background .16s ease, box-shadow .16s ease; }

/* 3) Respeita quem prefere menos movimento (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  .tab-panel.active { animation: none; }
  .card, .btn, .feed-video-card, .sponsor-card, .conversation-item,
  .connection-card, .discovery-card, .feed-carousel-slide, .nav-item, .info-tile {
    transition: none;
  }
}
.nav-item.active { border-radius: 14px; background: #eef3ff; color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.dashboard-split-note {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: linear-gradient(145deg, #eff6ff, #fff);
}
.dashboard-split-note b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #0f2c61;
  color: #fff;
  font-size: 12px;
}
.dashboard-split-note strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
}
.dashboard-split-note span {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}
.dashboard-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}
.dashboard-source-grid div {
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(145deg, #eff6ff, #fff);
}
.dashboard-source-grid strong {
  display: block;
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
}
.dashboard-source-grid span {
  display: block;
  margin-top: 6px;
  color: #475569;
  font-size: 11px;
  line-height: 1.3;
}
.dashboard-export-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(145deg, #eff6ff, #fff);
}
.dashboard-export-card strong { display: block; color: #0f172a; font-size: 13px; }
.dashboard-export-card span { display: block; margin-top: 4px; color: #64748b; font-size: 11px; line-height: 1.35; }
.dashboard-export-card b {
  flex: 0 0 auto;
  padding: 8px;
  border-radius: 9px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
}
.top-company-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}
.top-company-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #eff6ff, #fff);
}
.top-company-item b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}
.top-company-item strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
}
.top-company-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.top-company-item em {
  color: var(--primary-dark);
  font-style: normal;
  font-size: 16px;
  font-weight: 900;
}
.dashboard-tile {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.dashboard-tile strong {
  display: block;
  color: var(--primary-dark);
  font-size: 24px;
  line-height: 1;
}
.dashboard-tile span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.stage-bars, .report-list { display: grid; gap: 10px; margin-top: 14px; }
.stage-bar {
  display: grid;
  grid-template-columns: 110px 1fr 28px;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.stage-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.stage-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f2c61, #2563eb);
}
.report-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}
.report-item strong { display: block; color: #0f172a; font-size: 13px; }
.report-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.dashboard-access {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.lia-chip {
  position: fixed;
  left: auto;
  right: max(14px, calc(50% - 232px));
  bottom: calc(86px + var(--safe-bottom));
  z-index: 35;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: #4338ca;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 8px 22px rgba(67,56,202,.45);
  font-size: 11px;
  font-weight: 700;
  transition: opacity 160ms ease, transform 160ms ease, right 160ms ease;
}
.lia-chip::before {
  content: "✦";
  font-size: 17px;
  line-height: 1;
}
.lia-chip.context-hidden {
  opacity: 0;
  transform: translateX(18px) scale(.88);
  pointer-events: none;
}
body[data-active-tab="config"] .lia-chip {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  opacity: .9;
}
body[data-active-tab="config"] .lia-chip.context-hidden {
  opacity: 0;
}
#lia-panel {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(94px + var(--safe-bottom));
  z-index: 35;
  width: min(456px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow2);
  transition: 160ms ease;
  max-height: calc(100vh - 156px - var(--safe-bottom));
}
#lia-panel * { box-sizing: border-box; min-width: 0; }
#lia-panel.hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }
.lia-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #0f1a4a, #1e1b4b);
  color: #e0e7ff;
  font-size: 14px;
}
.lia-head > div:nth-child(2) { flex: 1; min-width: 0; }
.lia-head span { color: #c7d2fe; }
.lia-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.lia-close,
.lia-minimize {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}
.lia-minimize {
  font-size: 20px;
  font-weight: 950;
}
#lia-panel.minimized {
  left: auto;
  right: max(12px, calc(50% - 232px));
  bottom: calc(92px + var(--safe-bottom));
  width: min(292px, calc(100vw - 24px));
  border-radius: 18px;
}
#lia-panel.minimized .lia-body,
#lia-panel.minimized .lia-actions,
#lia-panel.minimized .lia-compose {
  display: none;
}
.lia-body {
  max-height: min(300px, calc(100vh - 286px - var(--safe-bottom)));
  overflow-y: auto;
  padding: 14px;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.45;
}
.lia-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: visible;
  padding: 0 12px 10px;
}
.lia-actions button {
  flex: 1 1 auto;
  min-height: 34px;
  padding-inline: 10px;
  white-space: nowrap;
}
.lia-dialog {
  display: grid;
  gap: 10px;
}
.lia-bubble {
  width: fit-content;
  max-width: 100%;
  padding: 11px 12px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.lia-bubble *,
.lia-bubble .lia-field span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.lia-bubble h4 {
  margin: 2px 0 7px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 950;
}
.lia-bubble p {
  margin: 0 0 8px;
}
.lia-bubble p:last-child {
  margin-bottom: 0;
}
.lia-bubble .lia-list-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.lia-bubble .lia-list-item i {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--primary);
}
.lia-bubble .lia-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.lia-bubble .lia-field strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.lia-bubble .lia-field span {
  color: var(--text);
  font-weight: 750;
}
.lia-bubble.bot {
  border-top-left-radius: 5px;
  background: #f8fafc;
}
.lia-bubble.user {
  justify-self: end;
  border-color: var(--primary);
  border-top-right-radius: 5px;
  background: var(--primary);
  color: #fff;
}
.lia-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  margin: 0 0 0 6px;
  padding: 4px 8px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  vertical-align: middle;
  text-align: center;
  white-space: normal;
  max-width: 100%;
}
.lia-inline-link span {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 9px;
  letter-spacing: 0;
}
.admin-row,
.admin-process,
.info-tile,
.service-contact-row,
.company-meta-table dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.lia-bubble.thinking {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #475569;
}
.lia-bubble.thinking span {
  margin-right: 2px;
}
.lia-bubble.thinking i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
  animation: liaPulse 900ms infinite ease-in-out;
}
.lia-bubble.thinking i:nth-child(3) { animation-delay: 120ms; }
.lia-bubble.thinking i:nth-child(4) { animation-delay: 240ms; }
.typing-caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  border-right: 2px solid #1e40af;
  vertical-align: -2px;
  animation: liaBlink 800ms infinite;
}
@keyframes liaPulse {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
@keyframes liaBlink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}
.lia-helper {
  padding: 10px;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  line-height: 1.35;
}
.lia-options, .lia-faq {
  display: grid;
  gap: 8px;
}
.lia-options button, .lia-faq button {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}
.lia-faq {
  grid-template-columns: 1fr 1fr;
}
.lia-result {
  padding: 12px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 13px;
  line-height: 1.45;
}
.lia-compose {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.lia-compose input {
  width: 0;
  min-width: 0;
  flex: 1;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font-size: 13px;
}
.lia-compose input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px #dbeafe;
}
.lia-compose button {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.access-note {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}
.access-note strong {
  display: block;
  margin-bottom: 3px;
  color: #0f172a;
}
.access-note.partner { border: 1px solid #c7d2fe; background: #eef2ff; color: #1e40af; }
.access-note.visitor { border: 1px solid #fde68a; background: #fffbeb; color: #92400e; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(15,23,42,.28); }
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 54px);
  margin: 0 auto;
  padding: 10px 20px calc(22px + var(--safe-bottom));
  overflow-y: auto;
  background: #0f2c61;
  border: 1px solid rgba(255,255,255,.12);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 30px rgba(2,6,23,.4);
  transform: translateY(100%);
  transition: transform 180ms ease;
}
.bottom-sheet.open { transform: translateY(0); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 18px; border-radius: 999px; background: rgba(255,255,255,.3); }
.sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sheet-header h2 { font-size: 20px; line-height: 1.2; color: #ffffff; }
.sheet-header p { margin-top: 5px; color: #c7d4ec; font-size: 13px; line-height: 1.35; }
.bottom-sheet .close-button svg { stroke: #fff; }
.close-button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #475569;
}
.close-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.smart-box { margin-top: 20px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.smart-box h3, .trust-section h3 { margin-bottom: 10px; color: #8fb8ff; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.smart-box p { color: #e9f0ff; font-size: 14px; line-height: 1.48; }
.trust-section { margin-top: 20px; }
.trust-section ul { display: grid; gap: 12px; list-style: none; }
.trust-section li { color: #e9f0ff; font-size: 14px; line-height: 1.35; }
.trust-section li span { color: #9fb3d4; font-weight: 800; }
.trust-section li strong { color: #4ade80; font-weight: 900; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15,23,42,.36);
}
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(5, 15, 39, .58);
  backdrop-filter: blur(5px);
}
.admin-form-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 120;
  width: min(560px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: hidden;
  border: 1px solid rgba(147,197,253,.7);
  border-radius: 22px;
  background: linear-gradient(155deg, #fff 0%, #f4f8ff 100%);
  box-shadow: 0 30px 90px rgba(2, 6, 23, .38);
  transform: translate(-50%, -50%);
  animation: adminModalIn .2s ease-out;
}
.admin-modal-accent {
  height: 5px;
  background: linear-gradient(90deg, #0f2c61 0%, #2857d5 68%, #d4af37 100%);
}
.admin-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #dbeafe;
}
.admin-modal-header > div { min-width: 0; }
.admin-modal-header span {
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.admin-modal-header h2 {
  margin-top: 4px;
  color: #0f2c61;
  font-size: 21px;
  line-height: 1.15;
}
.admin-modal-header p {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.admin-modal-close {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff;
  color: #475569;
  font-size: 24px;
}
#adminModalForm {
  max-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
}
.admin-modal-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  padding: 17px 18px;
  overflow-y: auto;
}
.admin-modal-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.admin-modal-field.full { grid-column: 1 / -1; }
.admin-modal-field > span {
  color: #25334d;
  font-size: 12px;
  font-weight: 900;
}
.admin-modal-field input,
.admin-modal-field textarea,
.admin-modal-field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #cbd8ea;
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.admin-modal-field textarea { min-height: 88px; resize: vertical; }
.admin-modal-field input:focus,
.admin-modal-field textarea:focus,
.admin-modal-field select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.14);
}
.admin-modal-field small {
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}
.admin-modal-feedback {
  margin: 0 18px 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
}
.admin-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #dbeafe;
  background: rgba(255,255,255,.92);
}
.admin-modal-actions button {
  min-height: 48px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 950;
}
.admin-modal-cancel {
  border: 1px solid #cbd8ea;
  background: #fff;
  color: #334155;
}
.admin-modal-submit {
  border: 0;
  background: linear-gradient(135deg, #173b8f, #2857d5);
  color: #fff;
  box-shadow: 0 9px 20px rgba(30,64,175,.22);
}
.admin-modal-submit.danger {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}
body.admin-modal-open { overflow: hidden; }
@keyframes adminModalIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.survey-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 70;
  width: min(430px, calc(100% - 32px));
  padding: 20px;
  border-radius: 20px;
  background: #0f2c61;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow2);
  transform: translate(-50%, -50%);
}
.survey-modal h3 {
  font-size: 20px;
  line-height: 1.2;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}
.survey-modal p {
  margin-top: 7px;
  color: #c7d4ec !important;
  -webkit-text-fill-color: #c7d4ec;
  font-size: 13px;
  line-height: 1.4;
}
.survey-modal textarea {
  background: #07152f;
  color: #eaf1ff;
  border: 1px solid rgba(255,255,255,.16);
}
.survey-modal textarea::placeholder { color: #8fa3c4; }
.survey-modal .form-note { color: #9fb3d4 !important; }
.survey-rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 16px 0 12px;
}
.survey-rating button {
  min-height: 42px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--primary);
  font-weight: 900;
}
.survey-rating button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.survey-modal textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  resize: vertical;
  outline: none;
}
.survey-modal textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px #dbeafe;
}

[hidden] { display: none !important; }

.back-to-associated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin: 0 0 12px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(58,123,189,.12);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
body[data-theme="dark"] .back-to-associated {
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
  border-color: rgba(255,255,255,.2);
}

.company-logo-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, #153c9b, #071f5f);
  color: #fff;
  box-shadow: 0 8px 20px rgba(30,64,175,.22);
}
.company-logo-mark.has-real-logo { background: #fff; box-shadow: 0 6px 16px rgba(2,6,23,.2); }
.company-logo-mark.has-real-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.company-logo-mark::before,
.company-logo-mark i {
  content: "";
  position: absolute;
  border: 1px solid rgba(96,165,250,.72);
  border-radius: 999px;
}
.company-logo-mark::before { width: 38px; height: 38px; right: -14px; top: -14px; }
.company-logo-mark i { width: 24px; height: 24px; left: -10px; bottom: -10px; }
.company-logo-mark span { position: relative; z-index: 2; font-size: 13px; font-weight: 900; }
.company-logo-mark.small-avatar { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
.company-logo-mark.small-avatar span { font-size: 11px; }

.discovery-shell { padding: 13px; }
.discovery-head { margin-bottom: 7px; }
.discovery-head strong { font-size: 15px; }
.discovery-stage { min-height: 180px; padding-top: 0; }
.discovery-back-card {
  height: 88px;
  padding: 11px;
  border: 1px solid rgba(96,165,250,.22);
}
.discovery-back-card span { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; }
.discovery-back-card strong { margin-top: 7px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.discovery-back-card small { display: block; margin-top: 3px; color: #bfdbfe; font-size: 10px; }
.discovery-card {
  top: 42px;
  grid-template-columns: 58px 1fr;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(96,165,250,.42);
  border-radius: 15px;
  animation: deckEnter .24s ease both;
}
.discovery-card .company-logo-mark { width: 58px; height: 58px; flex-basis: 58px; }
.discovery-card .company-logo-mark span { font-size: 14px; }
.discovery-copy > span { padding: 3px 7px; font-size: 9px; }
.discovery-copy h3 { margin-top: 6px; font-size: 17px; }
.discovery-copy p { margin-top: 3px; font-size: 11px; }
.discovery-summary {
  display: -webkit-box;
  margin-top: 6px;
  color: #475569;
  font-size: 11px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discovery-indicators { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.discovery-indicators i { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.34); }
.discovery-indicators i.active { width: 20px; background: #22c55e; }
.discovery-primary-actions { margin-top: 11px; }
.discovery-primary-actions button { min-height: 43px; border-radius: 11px; font-size: 13px; }
.discovery-primary-actions .app { background: linear-gradient(135deg, #1d4ed8, #1e40af); }
.deck-footer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.deck-footer-actions button { border: 0; background: transparent; color: #dbeafe; font-size: 12px; font-weight: 900; }
@keyframes deckEnter {
  from { opacity: .7; transform: translateX(8px) scale(.992); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.chat-assist details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 13px;
}
.chat-assist details summary span { color: var(--muted); font-size: 11px; }
.attachment-bar { padding: 7px 10px; margin: 8px 0; background: #eff6ff; border-style: solid; }
.chat-input { align-items: stretch; }
.chat-input .attach-icon-button {
  width: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: var(--primary);
}
.attach-icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.appearance-card p { margin: -4px 0 12px; color: var(--muted); font-size: 13px; }
.appearance-card label { display: block; color: var(--ink); font-size: 13px; font-weight: 900; }
.appearance-card select {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
}

body[data-theme="dark"] {
  --bg: #07152f;
  --card: #0c1e3a;
  --ink: #dde6f0;
  --muted: #6b8aad;
  --line: #18305a;
  --primary: #3a7bbd;
  --primary-dark: #dde6f0;
  --shadow: 0 8px 20px rgba(0,0,0,.32);
  --shadow2: 0 16px 34px rgba(0,0,0,.48);
}
/* App transparente no tema escuro: o fundo #07152f fica no <body>, e o canvas
   de constelação (#appFx) passa a aparecer atrás de todo o conteúdo. Sem isso o
   .app opaco cobria o efeito e as telas ficavam "chapadas". */
body[data-theme="dark"] { background: #07152f; }
body[data-theme="dark"] .app {
  background:
    radial-gradient(760px 360px at 18% -20%, rgba(30,42,122,.22) 0%, transparent 58%),
    transparent;
}
body[data-theme="dark"] .feed-stories-wrap { background: transparent; }
body[data-theme="dark"] .bottom-nav {
  background: #040d1f;
  border-color: #1e3560;
}
/* Cabeçalhos das abas: transparentes para o fundo de constelação (#appFx)
   aparecer, como na seção "Vídeos ACICG". Um degradê suave no topo mantém o
   título legível quando o conteúdo rola por baixo. */
body[data-theme="dark"] .header,
body[data-theme="dark"] .header-simple,
body[data-theme="dark"] .admin-page-header {
  background: linear-gradient(180deg, rgba(4,13,31,.92) 0%, rgba(4,13,31,.55) 60%, rgba(4,13,31,0) 100%) !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(2px);
}
/* Mantém o filete dourado como assinatura, mas discreto. */
body[data-theme="dark"] .header::after { opacity: .5; }
body[data-theme="dark"] .header h1,
body[data-theme="dark"] .company-text h3,
body[data-theme="dark"] .info-tile strong,
body[data-theme="dark"] .card-title,
body[data-theme="dark"] .conversation-item strong,
body[data-theme="dark"] .tracker-field strong,
body[data-theme="dark"] .admin-row strong { color: #f8fbff; }
body[data-theme="dark"] .card,
body[data-theme="dark"] .company-item,
body[data-theme="dark"] .connection-tools,
body[data-theme="dark"] .conversation-item,
body[data-theme="dark"] .info-tile,
body[data-theme="dark"] .tracker-field,
body[data-theme="dark"] .history-list,
body[data-theme="dark"] .chat-thread,
body[data-theme="dark"] .notification-panel,
body[data-theme="dark"] .appearance-card select {
  background: #0d2040;
  border-color: #1e3560;
}
body[data-theme="dark"] .nav-item { color: #4a6a8a; }
body[data-theme="dark"] .nav-item.active { background: rgba(58,123,189,.10); color: #3a7bbd; box-shadow: inset 0 2.5px 0 #3a7bbd; }
body[data-theme="dark"] .priority-box,
body[data-theme="dark"] .completion-box,
body[data-theme="dark"] .empty-state,
body[data-theme="dark"] .connection-compact,
body[data-theme="dark"] .chat-assist,
body[data-theme="dark"] .attachment-bar {
  background: #0a1f44;
  border-color: #1e3560;
  color: #7a9cc5;
}
body[data-theme="dark"] .company-meta-table {
  border-color: rgba(147,197,253,.20);
  background: rgba(5,20,48,.42);
}
body[data-theme="dark"] .company-meta-table div { border-color: rgba(147,197,253,.20); }
body[data-theme="dark"] .company-meta-table dt { color: #93c5fd; }
body[data-theme="dark"] .company-meta-table dd { color: #cbd5e1; }
body[data-theme="dark"] .demo-data-note,
body[data-theme="dark"] .dashboard-source-grid div,
body[data-theme="dark"] .dashboard-export-card {
  border-color: rgba(147,197,253,.20);
  background: rgba(5,20,48,.42);
}
body[data-theme="dark"] .area-card,
body[data-theme="dark"] .area-card.event-card,
body[data-theme="dark"] .event-highlight {
  border-color: rgba(147,197,253,.24);
  background:
    radial-gradient(140px 90px at 100% 0%, rgba(34,197,94,.12), transparent 70%),
    rgba(5,20,48,.52);
}
body[data-theme="dark"] .area-card strong,
body[data-theme="dark"] .event-highlight strong { color: #f8fbff; }
body[data-theme="dark"] .area-card small,
body[data-theme="dark"] .event-highlight p { color: #cbd5e1; }
body[data-theme="dark"] .demo-data-note span,
body[data-theme="dark"] .dashboard-source-grid span,
body[data-theme="dark"] .dashboard-export-card span { color: #cbd5e1; }
body[data-theme="dark"] .dashboard-export-card strong { color: #f8fbff; }
body[data-theme="dark"] .chat-bubble { background: #102d59; border-color: rgba(147,197,253,.20); color: #f8fbff; }
body[data-theme="dark"] .chat-line.mine .chat-bubble { background: #1d4ed8; }
body[data-theme="dark"] .lia-inline-link {
  border-color: rgba(34,197,94,.36);
  background: rgba(22,163,74,.18);
  color: #bbf7d0;
}
body[data-theme="dark"] .notification-panel {
  background:
    radial-gradient(circle at top right, rgba(34,197,94,.16), transparent 34%),
    linear-gradient(180deg, rgba(8,31,70,.96), rgba(7,21,47,.96));
}
body[data-theme="dark"] .notification-head strong,
body[data-theme="dark"] .notification-item strong { color: #f8fbff; }
body[data-theme="dark"] .notification-head span,
body[data-theme="dark"] .notification-item span,
body[data-theme="dark"] .notification-item em { color: #cbd5e1; }
body[data-theme="dark"] .notification-item {
  background: rgba(15,44,97,.72);
  border-color: rgba(147,197,253,.20);
}
body[data-theme="dark"] .notification-item.new {
  background: linear-gradient(135deg, rgba(37,99,235,.28), rgba(22,163,74,.14));
}
body[data-theme="dark"] .notification-lgpd,
body[data-theme="dark"] .privacy-note {
  background: rgba(37,99,235,.16);
  border-color: rgba(147,197,253,.28);
  color: #dbeafe;
}
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea { background: rgba(5,20,48,.85); border-color: rgba(147,197,253,.24); color: #f8fbff; }

/* Contraste integral do tema escuro. */
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder { color: #94a9c5; opacity: 1; }
body[data-theme="dark"] option { background: #0a2348; color: #f8fbff; }
body[data-theme="dark"] label,
body[data-theme="dark"] p,
body[data-theme="dark"] span,
body[data-theme="dark"] small,
body[data-theme="dark"] em,
body[data-theme="dark"] dd { color: #cbd8ea; }
body[data-theme="dark"] strong,
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] dt,
body[data-theme="dark"] summary { color: #f8fbff; }
body[data-theme="dark"] .btn-secondary,
body[data-theme="dark"] .secondary-row button,
body[data-theme="dark"] .stage-actions button,
body[data-theme="dark"] .quick-replies button,
body[data-theme="dark"] .admin-row-actions button {
  background: rgba(18,48,91,.95);
  border-color: rgba(125,211,252,.34);
  color: #eaf4ff;
}
body[data-theme="dark"] .connection-question,
body[data-theme="dark"] .connection-meeting,
body[data-theme="dark"] .task-list > div,
body[data-theme="dark"] .admin-company-card,
body[data-theme="dark"] .admin-action-explanation,
body[data-theme="dark"] .report-item {
  background: rgba(5,20,48,.58);
  border-color: rgba(147,197,253,.22);
  color: #e6eef9;
}
body[data-theme="dark"] .connection-question span,
body[data-theme="dark"] .connection-meeting span,
body[data-theme="dark"] .admin-action-explanation,
body[data-theme="dark"] .report-item span { color: #c8d7eb; }
body[data-theme="dark"] .status-pill,
body[data-theme="dark"] .badge { color: #082f49; }
body[data-theme="dark"] #lia-panel,
body[data-theme="dark"] .admin-form-modal {
  background: #091d3d;
  border-color: rgba(147,197,253,.25);
}
body[data-theme="dark"] .lia-bubble.bot,
body[data-theme="dark"] .lia-helper {
  background: #102d59;
  border-color: rgba(147,197,253,.22);
  color: #f4f8ff;
}
body[data-theme="dark"] .admin-modal-feedback {
  background: rgba(245,158,11,.13);
  border-color: rgba(251,191,36,.35);
  color: #fde68a;
}
body[data-theme="dark"] .admin-page,
body[data-theme="dark"] .screen,
body[data-theme="dark"] .content,
body[data-theme="dark"] .main-content {
  color: #f8fbff;
}
body[data-theme="dark"] .admin-card,
body[data-theme="dark"] .admin-metric,
body[data-theme="dark"] .admin-empty,
body[data-theme="dark"] .admin-tab-panel,
body[data-theme="dark"] .profile-panel,
body[data-theme="dark"] .filter-panel,
body[data-theme="dark"] .connection-card,
body[data-theme="dark"] .company-profile-card,
body[data-theme="dark"] .form-section,
body[data-theme="dark"] .settings-section {
  background: rgba(10,35,72,.94);
  border-color: rgba(147,197,253,.22);
  color: #f8fbff;
}
body[data-theme="dark"] .admin-company-card .muted,
body[data-theme="dark"] .admin-company-card p,
body[data-theme="dark"] .admin-company-card span,
body[data-theme="dark"] .company-text p,
body[data-theme="dark"] .metric-label,
body[data-theme="dark"] .form-help,
body[data-theme="dark"] .field-help,
body[data-theme="dark"] .empty-state p {
  color: #c9d7e9;
}
body[data-theme="dark"] .admin-form-backdrop {
  background: rgba(1, 8, 24, .78);
}
body[data-theme="dark"] .admin-form-modal input,
body[data-theme="dark"] .admin-form-modal textarea,
body[data-theme="dark"] .admin-form-modal select {
  background: #071a38;
  border-color: rgba(125,211,252,.34);
  color: #f8fbff;
}
body[data-theme="dark"] .admin-form-modal .btn-secondary,
body[data-theme="dark"] .admin-company-card button:not(.danger):not(.btn-primary) {
  background: #12305b;
  border-color: rgba(125,211,252,.34);
  color: #eef7ff;
}
body[data-theme="dark"] .section-title::after {
  background: linear-gradient(90deg, rgba(96,165,250,.55), rgba(34,197,94,.16));
}
body[data-theme="dark"] a:not(.btn):not(.lia-inline-link) {
  color: #7dd3fc;
}

@media (max-width: 420px) {
  .section-title { margin-top: 20px; font-size: 14px; }
  .discovery-head span { font-size: 11px; }
  .discovery-head strong { font-size: 14px; }
  .discovery-stage { min-height: 176px; }
  .discovery-card { grid-template-columns: 54px 1fr; top: 44px; gap: 10px; padding: 12px; }
  .discovery-card .company-logo-mark { width: 54px; height: 54px; flex-basis: 54px; }
  .discovery-copy h3 { font-size: 16px; }
  .discovery-primary-actions { gap: 7px; }
  .discovery-primary-actions button { font-size: 12px; }
  .bottom-nav { min-height: calc(80px + var(--safe-bottom)); padding-inline: 5px; }
  .nav-item { height: 64px; font-size: 12.5px; }
  .nav-item svg { width: 26px; height: 26px; }
}

@media (min-width: 481px) {
  .bottom-nav { right: auto; left: 50%; transform: translateX(-50%); }
}

.notification-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 16px;
  background: #eef3ff;
  color: var(--primary);
  display: grid;
  place-items: center;
  position: relative;
}
.notification-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-button span {
  position: absolute;
  right: 2px;
  top: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.notification-button.has-new { box-shadow: 0 0 0 4px rgba(37,99,235,.09); }
.notification-panel {
  position: absolute;
  top: calc(100% - 6px);
  right: 16px;
  width: min(360px, calc(100vw - 32px));
  padding: 13px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(22,163,74,.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 18px 44px rgba(15,44,97,.18);
  z-index: 30;
}
.notification-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.notification-head strong { display: block; color: var(--ink); font-size: 15px; }
.notification-head span { display: block; margin-top: 2px; color: #64748b; font-size: 11px; line-height: 1.25; }
.notification-head button {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 11px;
}
.notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: flex-start;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  text-align: left;
  cursor: pointer;
}
.notification-item.new {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  box-shadow: inset 3px 0 0 #16a34a;
}
.notification-item i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #0f2c61;
  color: #fff;
  font-style: normal;
  font-weight: 950;
  font-size: 16px;
}
/* Cor por categoria: uma faixa lateral e o fundo do ícone identificam o tipo
   da notificação num relance. */
.notification-item.ntf-chat      { box-shadow: inset 4px 0 0 #2563eb; }
.notification-item.ntf-chat i    { background: #2563eb; }
.notification-item.ntf-conexao   { box-shadow: inset 4px 0 0 #16a34a; }
.notification-item.ntf-conexao i { background: #16a34a; }
.notification-item.ntf-anexo     { box-shadow: inset 4px 0 0 #7c3aed; }
.notification-item.ntf-anexo i   { background: #7c3aed; }
.notification-item.ntf-proposta  { box-shadow: inset 4px 0 0 #ca8a04; }
.notification-item.ntf-proposta i{ background: #ca8a04; }
.notification-item.ntf-reuniao   { box-shadow: inset 4px 0 0 #0891b2; }
.notification-item.ntf-reuniao i { background: #0891b2; }
.notification-item.ntf-contrato  { box-shadow: inset 4px 0 0 #16a34a; }
.notification-item.ntf-contrato i{ background: #15803d; }
.notification-item.ntf-cadastro  { box-shadow: inset 4px 0 0 #64748b; }
.notification-item.ntf-cadastro i{ background: #475569; }
.notification-item.ntf-alerta    { box-shadow: inset 4px 0 0 #dc2626; }
.notification-item.ntf-alerta i  { background: #dc2626; }
.notification-item.ntf-relatorio { box-shadow: inset 4px 0 0 #0d9488; }
.notification-item.ntf-relatorio i{ background: #0d9488; }
.notification-item.ntf-aviso     { box-shadow: inset 4px 0 0 #d4a017; }
.notification-item.ntf-aviso i   { background: #d4a017; }
.notification-item.ntf-sistema i { background: #0f2c61; }
/* Um item não lido mantém o realce da faixa colorida da própria categoria,
   por isso a regra .new não sobrescreve o box-shadow aqui. */
.notification-item.new { border-color: #cbd5e1; }
/* Botões do cabeçalho (Marcar lidas + Limpar) lado a lado. */
.notification-head-btns { display: flex; gap: 6px; flex-shrink: 0; }
.notif-clear {
  border: 1px solid #fecaca !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
}
body[data-theme="dark"] .notif-clear {
  border-color: rgba(248,113,113,.4) !important;
  background: rgba(220,38,38,.16) !important;
  color: #fca5a5 !important;
}
.notification-item > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.notification-item strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.notification-item span {
  display: block;
  font-size: 12px;
  color: #475569;
  line-height: 1.38;
  overflow-wrap: anywhere;
}
.notification-item em {
  display: block;
  font-size: 10px;
  color: #64748b;
  font-style: normal;
  overflow-wrap: anywhere;
}
.notification-lgpd,
.privacy-note {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #0f2c61;
}
.notification-lgpd strong,
.privacy-note strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.notification-lgpd span,
.privacy-note span {
  display: block;
  font-size: 11px;
  line-height: 1.35;
}
.small-empty { padding: 12px; }

.app-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  top: calc(12px + var(--safe-top));
  z-index: 80;
  max-width: 440px;
  margin: 0 auto;
  padding: 13px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(22,163,74,.16), transparent 38%),
    linear-gradient(135deg, #ffffff, #eef6ff);
  box-shadow: 0 18px 44px rgba(15,44,97,.24);
  color: #0f172a;
  text-align: left;
  animation: toastIn .22s ease both;
}
.app-toast strong {
  display: block;
  color: var(--primary-dark);
  font-size: 14px;
  line-height: 1.2;
}
.app-toast span {
  display: block;
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.app-toast em {
  display: inline-block;
  margin-top: 9px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #0f2c61;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.completion-box {
  margin-top: 14px;
  padding: 13px;
  border-radius: 16px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}
.completion-box > div:first-child { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 12px; color: #0f2c61; }
.completion-box strong { font-size: 13px; }
.completion-box small {
  display: block;
  margin-top: 8px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}
.completion-track { height: 8px; margin-top: 10px; border-radius: 999px; background: #dbeafe; overflow: hidden; }
.completion-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #16a34a); }

.match-deck {
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #172235;
  color: #fff;
  box-shadow: 0 12px 30px rgba(15,26,74,.18);
}
.discovery-shell { padding: 14px; }
.discovery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.discovery-head span {
  display: block;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 900;
}
.discovery-head strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  line-height: 1.1;
}
.discovery-head button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.discovery-stage {
  position: relative;
  min-height: 268px;
  padding-top: 12px;
}
.discovery-back-card {
  position: absolute;
  top: 0;
  height: 118px;
  border-radius: 10px;
  overflow: hidden;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(30,64,175,.92), rgba(15,26,74,.86)),
    radial-gradient(160px 90px at 80% 20%, rgba(216,176,68,.28), transparent);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
  opacity: .72;
}
.discovery-back-card.card-0 { left: 0; width: 58%; }
.discovery-back-card.card-1 { left: 34%; width: 45%; top: 14px; opacity: .58; }
.discovery-back-card.card-2 { right: 0; width: 36%; top: 28px; opacity: .42; }
.discovery-back-card span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.16);
  font-weight: 900;
}
.discovery-back-card strong {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.2;
}
.discovery-card {
  position: relative;
  z-index: 2;
  top: 58px;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.94));
  color: #0f172a;
  box-shadow: 0 18px 44px rgba(0,0,0,.25);
}
.discovery-logo {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 22%, #60a5fa, transparent 24%),
    linear-gradient(135deg, #1e40af, #0f1a4a);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(30,64,175,.25);
}
.discovery-copy > span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 10px;
  font-weight: 900;
}
.discovery-copy h3 {
  margin-top: 8px;
  font-size: 19px;
  line-height: 1.12;
}
.discovery-copy p {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
}
/* CORRECAO CONTRASTE: o cartao de descoberta e SEMPRE claro, entao o texto
   precisa ser escuro (o tema escuro estava clareando e sumindo as letras). */
.discovery-card .discovery-copy h3 {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
}
.discovery-card .discovery-copy p {
  color: #334155 !important;
  -webkit-text-fill-color: #334155;
}
.discovery-card .discovery-summary {
  color: #334155 !important;
  -webkit-text-fill-color: #334155;
}
.discovery-card .discovery-copy > span {
  background: #1e40af !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}
.discovery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.discovery-grid div {
  min-width: 0;
  padding: 9px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
}
.discovery-grid b {
  display: block;
  color: #0f172a;
  font-size: 11px;
}
.discovery-grid small {
  display: -webkit-box;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discovery-ribbon {
  position: relative;
  z-index: 3;
  width: calc(100% - 30px);
  margin: 74px 15px 0;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #dff2ff, #ffffff);
  color: #0f2c61;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.match-deck .priority-box {
  margin-top: 14px;
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #e5edff;
}
.match-deck .deck-actions {
  padding-bottom: 2px;
}
.match-deck .btn-pass {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
  color: #fff;
}

@media (max-width: 420px) {
  .discovery-stage { min-height: 176px; }
  .discovery-card { grid-template-columns: 54px 1fr; top: 44px; gap: 10px; padding: 12px; }
}

.app-connect-row .btn { margin-top: 0; }
.btn:disabled { opacity: .58; cursor: not-allowed; box-shadow: none; }
.mini-expand {
  flex: 0 0 auto;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
  height: 38px;
  padding: 0 13px 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}
.mini-expand .mini-expand-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
}
.mini-expand.aberto {
  background: rgba(148,163,184,.14);
  border-color: rgba(148,163,184,.5);
  color: var(--muted);
}
body[data-theme="dark"] .mini-expand {
  background: linear-gradient(135deg, #2563eb, #4338ca);
  border-color: rgba(147,197,253,.55);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37,99,235,.35);
}
body[data-theme="dark"] .mini-expand .mini-expand-tag { color: #fff; }
body[data-theme="dark"] .mini-expand.aberto {
  background: rgba(148,163,184,.22);
  border-color: rgba(148,163,184,.55);
  color: #e6edf7;
  box-shadow: none;
}

.history-list {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
}
.history-list > strong { display: block; margin-bottom: 8px; font-size: 13px; color: #0f2c61; }
.history-item { display: grid; gap: 3px; margin-top: 8px; padding: 0 0 10px 10px; border-left: 3px solid #93c5fd; }
.history-item span { color: #64748b; font-size: 11px; }
.history-item strong { color: var(--ink); font-size: 13px; }
.history-item em { color: #334155; font-style: normal; font-size: 11px; }
.history-item p { margin: 0; color: #475569; font-size: 12px; line-height: 1.35; }
/* Contraste do histórico dentro do card do Admin. O card é branco; no tema
   escuro o título saía branco-no-branco. Aqui deixamos o card com cara de
   tema escuro e o texto legível. */
body[data-theme="dark"] .admin-details {
  background: rgba(255,255,255,.04);
  border-color: rgba(147,197,253,.2);
}
body[data-theme="dark"] .admin-details summary { color: #cfe0f5; }
body[data-theme="dark"] .admin-details .history-item strong,
body[data-theme="dark"] .admin-details .hist-titulo { color: #f0f6ff; }
body[data-theme="dark"] .admin-details .history-item span,
body[data-theme="dark"] .admin-details .hist-data { color: #9db8db; }
body[data-theme="dark"] .admin-details .history-item em,
body[data-theme="dark"] .admin-details .hist-quem { color: #c3d5ea; }
body[data-theme="dark"] .admin-details .history-item p,
body[data-theme="dark"] .admin-details .hist-detalhe { color: #cdd8ec; }
body[data-theme="dark"] .admin-details .history-item { border-left-color: #3b6fb5; }

.admin-filter-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin: 4px 0 10px; }
.admin-filter-bar button {
  flex: 0 0 auto;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
}
.admin-filter-bar button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.admin-details {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}
.admin-details summary { cursor: pointer; color: #0f2c61; font-weight: 900; font-size: 12px; }

.chat-search { margin: 14px 0 8px; }
.chat-search input {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  background: #f8fafc;
  outline: none;
}
.chat-search input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; background: #fff; }
.lia-dialog .lia-bubble.user + .lia-bubble.bot,
.lia-dialog .lia-bubble.bot + .lia-bubble.user { margin-top: 8px; }

.tab-loader {
  position: fixed;
  left: 50%;
  top: calc(76px + env(safe-area-inset-top));
  bottom: auto;
  transform: translateX(-50%);
  z-index: 34;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(15, 44, 97, .94);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15,44,97,.22);
  font-weight: 800;
  font-size: 12px;
  animation: fadeUp .22s ease-out;
}
.tab-loader img { width: 22px; height: 22px; border-radius: 8px; object-fit: cover; }
.tab-loader[hidden] { display: none !important; }

.app-tour[hidden] { display: none !important; }
.app-tour {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}
.app-tour-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(260px 180px at var(--tour-x, 50%) var(--tour-y, 40%), rgba(22, 163, 74, .16), transparent 70%),
    rgba(15, 23, 42, .18);
}
.app-tour-card {
  position: fixed;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: calc(92px + var(--safe-bottom));
  width: min(448px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid #c7d2e8;
  border-top: 4px solid var(--primary, #1e40af);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(2, 6, 23, .34);
  animation: coachMarkIn .22s ease both;
  pointer-events: auto;
  max-height: calc(100vh - 184px - var(--safe-bottom));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.app-tour-card.tour-card-top {
  top: calc(76px + env(safe-area-inset-top));
  bottom: auto;
}
.app-tour-card.tour-card-middle {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.app-tour-card::after {
  content: "";
  position: absolute;
  left: var(--arrow-left, 50%);
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-left: 1px solid #c7d2e8;
  border-top: 1px solid #c7d2e8;
  transform: translateX(-50%) rotate(45deg);
}
.app-tour-card.tour-arrow-up::after {
  top: -8px;
}
.app-tour-card.tour-arrow-down::after {
  bottom: -8px;
  transform: translateX(-50%) rotate(225deg);
}
.app-tour-card > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary, #1e40af);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
}
.app-tour-card h2 {
  margin-top: 12px;
  color: #0f2c61 !important;
  -webkit-text-fill-color: #0f2c61;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.18;
}
.app-tour-card p {
  margin-top: 8px;
  color: #1f2937 !important;
  -webkit-text-fill-color: #1f2937;
  font-size: 15px;
  line-height: 1.5;
}
.tour-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 16px 0;
}
.tour-progress i {
  height: 5px;
  border-radius: 999px;
  background: #dbeafe;
}
.tour-progress i.active {
  background: linear-gradient(90deg, #1e40af, #16a34a);
}
/* GRID à prova de tudo: Voltar e Próximo em duas colunas IGUAIS (1fr cada);
   Pular tour ocupa a linha inteira embaixo. */
.tour-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}
.tour-actions .btn {
  min-height: 46px;
  min-width: 0;
  width: 100%;
  font-weight: 800;
  border-radius: 12px;
  padding: 0 12px;
  white-space: nowrap;
  box-sizing: border-box;
}
#tourBack { grid-column: 1; grid-row: 1; }
#tourNext { grid-column: 2; grid-row: 1; }
#tourSkip { grid-column: 1 / -1; grid-row: 2; }
/* No 1º passo (sem Voltar), o Próximo ocupa a linha toda. */
.tour-actions:not(:has(#tourBack:not([hidden]))) #tourNext { grid-column: 1 / -1; }
.tour-actions .btn-secondary {
  background: #eef2f8;
  color: #0f2c61;
  border: 1px solid #c7d2e8;
}
.tour-actions .btn-primary {
  background: var(--primary, #1e40af);
  color: #ffffff;
  border: 1px solid var(--primary, #1e40af);
}
/* Olhinho mostrar/ocultar senha */
.pw-eye-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.pw-eye-wrap > input {
  width: 100%;
  padding-right: 46px;
}
.pw-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: .5;
  color: #475569;
}
.pw-eye:hover { opacity: .85; }
.pw-eye.on { opacity: 1; color: var(--primary, #1e40af); }
.tour-highlight {
  position: fixed;
  z-index: 1;
  border: 2px solid rgba(96, 165, 250, .95);
  border-radius: 20px;
  box-shadow:
    0 0 0 9999px rgba(6, 16, 34, .60),
    0 0 0 4px rgba(96, 165, 250, .28),
    0 0 22px 3px rgba(96, 165, 250, .55),
    0 0 0 1px rgba(242, 208, 137, .5) inset;
  transition: top .28s cubic-bezier(.4,0,.2,1), left .28s cubic-bezier(.4,0,.2,1), width .28s cubic-bezier(.4,0,.2,1), height .28s cubic-bezier(.4,0,.2,1);
  animation: tourPulse 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(6,16,34,.60), 0 0 0 4px rgba(96,165,250,.28), 0 0 20px 2px rgba(96,165,250,.45), 0 0 0 1px rgba(242,208,137,.5) inset; }
  50% { box-shadow: 0 0 0 9999px rgba(6,16,34,.60), 0 0 0 7px rgba(96,165,250,.16), 0 0 30px 6px rgba(96,165,250,.7), 0 0 0 1px rgba(242,208,137,.7) inset; }
}
.tour-highlight[hidden] { display: none !important; }
@keyframes fadeUp {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes coachMarkIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .notification-panel { right: 10px; }
  .app-connect-row { flex-direction: column; }
  .mini-expand { height: 34px; font-size: 16px; padding: 0 11px 0 9px; }
  .tracker-grid { grid-template-columns: 1fr; }
  .app-tour-card {
    border-radius: 20px;
    padding: 16px;
  }
  .app-tour-card h2 { font-size: 20px; }
  .app-tour-card p { font-size: 14px; }
  .admin-mobile-nav {
    position: sticky;
    top: calc(8px + env(safe-area-inset-top));
    z-index: 12;
    display: block;
    margin-bottom: 8px;
  }
  .admin-mobile-nav-toggle {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #bcd3f5;
    border-radius: 15px;
    background: linear-gradient(135deg, #0f2c61, #234bc1);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15,44,97,.2);
    text-align: left;
  }
  .admin-mobile-nav-toggle span,
  .admin-mobile-nav-toggle small,
  .admin-mobile-nav-toggle strong { display: block; }
  .admin-mobile-nav-toggle small { color: rgba(255,255,255,.7); font-size: 9px; text-transform: uppercase; }
  .admin-mobile-nav-toggle strong { margin-top: 2px; font-size: 15px; }
  .admin-mobile-nav-toggle b { font-size: 20px; transition: transform .18s ease; }
  .admin-mobile-nav-toggle[aria-expanded="true"] b { transform: rotate(180deg); }
  .admin-section-nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: sticky;
    top: calc(74px + env(safe-area-inset-top));
    z-index: 11;
    padding: 8px;
    box-shadow: 0 18px 34px rgba(15,44,97,.18);
  }
  .admin-section-nav.mobile-open { display: grid; animation: adminNavIn .16s ease-out; }
  .admin-section-nav button { min-height: 58px; grid-template-columns: 26px 1fr; place-items: center start; padding: 9px 10px; font-size: 11px; }
  .admin-section-nav button i { grid-row: 1; }
  .admin-section-nav button span { grid-column: 2; text-align: left; }
  .admin-form-modal {
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: calc(100vh - 34px);
    border-radius: 24px 24px 0 0;
    transform: translateX(-50%);
    animation: adminSheetIn .2s ease-out;
  }
  #adminModalForm { max-height: calc(100vh - 150px); }
  .admin-modal-fields { grid-template-columns: 1fr; padding: 15px 16px; }
  .admin-modal-field.full { grid-column: auto; }
  .admin-modal-header { padding: 16px; }
  .admin-modal-actions { padding-left: 16px; padding-right: 16px; }
}
@keyframes adminNavIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes adminSheetIn {
  from { opacity: 0; transform: translate(-50%, 18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Compact discovery queue: stable height on phones, motion only after user action. */
.discovery-shell { padding: 13px; }
.discovery-head { margin-bottom: 7px; }
.discovery-head strong { font-size: 15px; }
.discovery-stage { min-height: 180px; padding-top: 0; }
.discovery-back-card { height: 88px; padding: 11px; border: 1px solid rgba(96,165,250,.22); }
.discovery-back-card span { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; }
.discovery-back-card strong { margin-top: 7px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.discovery-card { top: 42px; grid-template-columns: 58px 1fr; gap: 11px; padding: 13px; border: 1px solid rgba(96,165,250,.42); border-radius: 15px; }
.discovery-card .company-logo-mark { width: 58px; height: 58px; flex-basis: 58px; }
.discovery-copy > span { padding: 3px 7px; font-size: 9px; }
.discovery-copy h3 { margin-top: 6px; font-size: 17px; }
.discovery-copy p { margin-top: 3px; font-size: 11px; }

@media (max-width: 420px) {
  .discovery-stage { min-height: 176px; }
  .discovery-card { grid-template-columns: 54px 1fr; top: 44px; gap: 10px; padding: 12px; }
  .discovery-card .company-logo-mark { width: 54px; height: 54px; flex-basis: 54px; }
  .chat-card { padding: 12px; }
  .chat-thread {
    min-height: 170px;
    max-height: 32vh;
    padding: 8px;
    gap: 7px;
  }
  .chat-bubble {
    max-width: 86%;
    padding: 9px 10px;
    font-size: 12.5px;
  }
  .chat-media {
    max-width: 100%;
    padding: 7px;
  }
  .chat-media img,
  .chat-media video {
    max-height: 180px;
  }
  .chat-file-row {
    gap: 6px;
  }
  .chat-file-download {
    padding: 5px 7px;
    font-size: 9px;
  }
  .chat-input {
    grid-template-columns: minmax(0, 1fr) 46px 72px;
    gap: 6px;
  }
  .chat-input input,
  .chat-input button {
    height: 46px;
    border-radius: 12px;
  }
  .chat-input button {
    padding: 0 8px;
    font-size: 14px;
  }
  .chat-assist {
    padding: 8px;
  }
  .chat-assist-actions {
    grid-template-columns: 1fr;
  }
}

/* Executive connection summary: the first view answers the practical questions. */
.home-summary-head {
  display: grid;
  gap: 3px;
  margin-bottom: 4px;
}
.home-summary-head strong {
  color: var(--primary-dark);
  font-size: 15px;
}
.home-summary-head span {
  color: var(--muted);
  font-size: 12px;
}
.channel-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.channel-summary span {
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  color: #475569;
  font-size: 11px;
  line-height: 1.3;
}
.channel-summary strong {
  display: block;
  color: var(--primary);
  font-size: 17px;
}
.home-meeting-list {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  padding: 11px;
  border: 1px solid #dbeafe;
  border-radius: 13px;
  background: #f8fbff;
}
.home-meeting-list strong {
  color: var(--primary-dark);
  font-size: 12px;
}
.home-meeting-list span {
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}
.connection-progress {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}
.connection-progress strong,
.connection-progress span {
  display: block;
}
.connection-progress strong {
  color: var(--primary-dark);
  font-size: 14px;
}
.connection-progress span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.connection-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}
.connection-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width .24s ease;
}
.connection-section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
  margin: 12px 2px 4px;
}
.connection-question-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0;
}
.connection-question {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}
.connection-question.wide { grid-column: 1 / -1; }
.connection-question strong {
  display: block;
  margin-bottom: 3px;
  color: var(--primary-dark);
  font-size: 12px;
}
.connection-question span {
  display: -webkit-box;
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.connection-question.next {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.connection-meeting {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}
.connection-meeting strong {
  color: var(--primary-dark);
  font-size: 12px;
}
.connection-meeting span {
  color: #475569;
  font-size: 12px;
  text-align: right;
}
.connection-main-actions {
  margin-top: 10px;
  flex-wrap: wrap;
}
.connection-main-actions .btn {
  flex: 1 1 130px;
  margin: 0;
}
.connection-details {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #dbeafe;
  border-radius: 13px;
  background: #f8fbff;
}
.connection-details summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
.compact-tracker { grid-template-columns: 1fr 1fr; }

body[data-theme="dark"] .home-summary-head strong,
body[data-theme="dark"] .home-meeting-list strong,
body[data-theme="dark"] .connection-question strong,
body[data-theme="dark"] .connection-meeting strong,
body[data-theme="dark"] .connection-progress strong {
  color: #dbeafe;
}
body[data-theme="dark"] .channel-summary span,
body[data-theme="dark"] .home-meeting-list,
body[data-theme="dark"] .connection-progress,
body[data-theme="dark"] .connection-question,
body[data-theme="dark"] .connection-meeting,
body[data-theme="dark"] .connection-details {
  border-color: rgba(96,165,250,.22);
  background: rgba(12,35,73,.66);
}
body[data-theme="dark"] .channel-summary span,
body[data-theme="dark"] .home-meeting-list span,
body[data-theme="dark"] .connection-question span,
body[data-theme="dark"] .connection-meeting span {
  color: #cbd5e1;
}

@media (max-width: 340px) {
  .channel-summary { grid-template-columns: 1fr; }
  .connection-question-grid { grid-template-columns: 1fr; }
  .connection-question.wide { grid-column: auto; }
  .compact-tracker { grid-template-columns: 1fr; }
}

/* Networking agenda: compact, horizontal and useful at a glance. */
.today-agenda-card {
  padding: 14px;
  overflow: hidden;
}
.today-agenda-head,
.today-agenda-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.today-agenda-head {
  margin-bottom: 10px;
}
.today-agenda-head strong,
.today-agenda-head span {
  display: block;
}
.today-agenda-head strong {
  color: var(--primary-dark);
  font-size: 16px;
}
.today-agenda-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.today-agenda-head b {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
}
.today-agenda-strip {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 1px 1px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.today-agenda-item {
  width: min(294px, calc(100vw - 96px));
  flex: 0 0 min(294px, calc(100vw - 96px));
  scroll-snap-align: start;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fbff, #fff);
}
.today-agenda-item.proposal {
  border-left-color: var(--success);
}
.today-agenda-top,
.today-agenda-facts {
  display: flex;
  align-items: center;
}
.today-agenda-top {
  justify-content: space-between;
  gap: 8px;
}
.today-agenda-top span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}
.today-agenda-top b {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
}
.today-agenda-item.proposal .today-agenda-top b {
  background: #dcfce7;
  color: #15803d;
}
.today-agenda-item h3 {
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 16px;
}
.today-agenda-item > p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.today-agenda-facts {
  align-items: stretch;
  gap: 5px;
  margin-top: 9px;
}
.today-agenda-facts span {
  min-width: 0;
  flex: 1;
  padding: 6px;
  border-radius: 8px;
  background: #eff6ff;
  color: #475569;
  font-size: 10px;
  line-height: 1.25;
}
.today-agenda-facts strong,
.today-agenda-context strong,
.today-agenda-next strong {
  display: block;
  margin-bottom: 2px;
  color: var(--primary-dark);
  font-size: 10px;
}
.today-agenda-context,
.today-agenda-next {
  margin-top: 8px;
  color: #475569;
  font-size: 11px;
  line-height: 1.3;
}
.today-agenda-next {
  padding-top: 7px;
  border-top: 1px solid #dbeafe;
}
.today-agenda-item > button,
.today-agenda-footer {
  border: 0;
  color: var(--primary);
  font-weight: 900;
}
.today-agenda-item > button {
  width: 100%;
  margin-top: 9px;
  padding: 9px;
  border-radius: 9px;
  background: #eef2ff;
  font-size: 12px;
}
.today-agenda-footer {
  width: 100%;
  margin-top: 9px;
  padding: 10px;
  border-radius: 10px;
  background: #eef2ff;
}
.today-agenda-footer-row {
  padding-top: 3px;
}
.today-agenda-footer-row span {
  color: var(--muted);
  font-size: 10px;
}
.today-agenda-footer-row button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

/* Discovery actions: the app action reads as the primary networking route. */
.discovery-primary-actions button {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  text-align: left;
}
.discovery-primary-actions button > span:last-child {
  min-width: 0;
}
.discovery-primary-actions strong,
.discovery-primary-actions small {
  display: block;
}
.discovery-primary-actions strong {
  color: #fff;
  font-size: 12px;
  line-height: 1.15;
}
.discovery-primary-actions small {
  margin-top: 3px;
  color: rgba(255,255,255,.78);
  font-size: 9px;
  line-height: 1.15;
}
.deck-action-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

body[data-theme="dark"] .today-agenda-head strong,
body[data-theme="dark"] .today-agenda-item h3,
body[data-theme="dark"] .today-agenda-facts strong,
body[data-theme="dark"] .today-agenda-context strong,
body[data-theme="dark"] .today-agenda-next strong {
  color: #dbeafe;
}
body[data-theme="dark"] .today-agenda-item {
  border-color: rgba(96,165,250,.26);
  border-left-color: #3b82f6;
  background: rgba(12,35,73,.76);
}
body[data-theme="dark"] .today-agenda-item.proposal {
  border-left-color: #22c55e;
}
body[data-theme="dark"] .today-agenda-facts span,
body[data-theme="dark"] .today-agenda-item > button,
body[data-theme="dark"] .today-agenda-footer {
  background: rgba(30,64,175,.20);
  color: #dbeafe;
}
body[data-theme="dark"] .today-agenda-context,
body[data-theme="dark"] .today-agenda-next {
  color: #cbd5e1;
}
body[data-theme="dark"] .admin-sync-bar {
  border-color: rgba(248,113,113,.34);
  background: rgba(127,29,29,.22);
}
body[data-theme="dark"] .admin-sync-bar.online {
  border-color: rgba(34,197,94,.34);
  background: rgba(20,83,45,.24);
}
body[data-theme="dark"] .admin-sync-bar span {
  color: #cbd5e1;
}
body[data-theme="dark"] .admin-sync-bar button {
  border-color: rgba(147,197,253,.28);
  background: rgba(5,20,48,.82);
  color: #dbeafe;
}
body[data-theme="dark"] .admin-debug-strip span {
  border-color: rgba(147,197,253,.20);
  background: rgba(5,20,48,.42);
  color: #cbd5e1;
}
body[data-theme="dark"] .admin-operations-panel {
  border-color: rgba(96,165,250,.22);
  background: linear-gradient(155deg, rgba(8,25,57,.96), rgba(12,42,84,.90));
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
}
body[data-theme="dark"] .admin-panel-heading h3,
body[data-theme="dark"] .admin-panel-subhead strong,
body[data-theme="dark"] .admin-operations-kpis strong,
body[data-theme="dark"] .admin-report-summary-grid strong,
body[data-theme="dark"] .admin-report-bar > strong {
  color: #e8f1ff;
}
/* Padronização: rótulos/eyebrows dos painéis admin no tom dourado do app. */
body[data-theme="dark"] .admin-panel-heading span {
  color: #f2d089;
}
body[data-theme="dark"] .admin-panel-heading p,
body[data-theme="dark"] .admin-panel-subhead span,
body[data-theme="dark"] .admin-operations-kpis small,
body[data-theme="dark"] .admin-conversation-row small,
body[data-theme="dark"] .admin-conversation-row em,
body[data-theme="dark"] .admin-feedback-row em {
  color: #a9bad1;
}
body[data-theme="dark"] .admin-operations-kpis > div,
body[data-theme="dark"] .admin-report-summary-grid > div,
body[data-theme="dark"] .admin-conversation-row,
body[data-theme="dark"] .admin-feedback-row,
body[data-theme="dark"] .admin-report-actions button {
  border-color: rgba(147,197,253,.18);
  background: rgba(5,20,48,.60);
}
body[data-theme="dark"] .admin-operations-kpis span,
body[data-theme="dark"] .admin-report-summary-grid span,
body[data-theme="dark"] .admin-conversation-row strong,
body[data-theme="dark"] .admin-feedback-row b {
  color: #dbeafe;
}
body[data-theme="dark"] .admin-feedback-row span,
body[data-theme="dark"] .admin-report-bar span {
  color: #cbd5e1;
}
body[data-theme="dark"] .admin-insight-note {
  border-color: rgba(96,165,250,.24);
  background: rgba(30,64,175,.18);
}
body[data-theme="dark"] .admin-insight-note span {
  color: #cbd5e1;
}
body[data-theme="dark"] .admin-report-tabs {
  background: rgba(5,20,48,.72);
}
body[data-theme="dark"] .admin-report-tabs button {
  color: #a9bad1;
}
body[data-theme="dark"] .admin-report-tabs button.active {
  background: #2563eb;
  color: #fff;
}
body[data-theme="dark"] .admin-mobile-nav-toggle {
  border-color: rgba(96,165,250,.45);
  background: linear-gradient(135deg, #071936, #173b8f);
}
body[data-theme="dark"] .admin-section-nav {
  border-color: rgba(96,165,250,.24);
  background: linear-gradient(145deg, #0c1c36, #10274a);
}
body[data-theme="dark"] .admin-section-nav button {
  background: rgba(15,35,66,.82);
  color: #dbeafe;
}
body[data-theme="dark"] .admin-section-nav button i {
  background: rgba(59,130,246,.18);
  color: #93c5fd;
}
body[data-theme="dark"] .admin-form-modal {
  border-color: rgba(96,165,250,.42);
  background: linear-gradient(155deg, #09182e 0%, #10284a 100%);
}
body[data-theme="dark"] .admin-modal-header,
body[data-theme="dark"] .admin-modal-actions {
  border-color: rgba(96,165,250,.22);
  background: rgba(7,20,40,.88);
}
body[data-theme="dark"] .admin-modal-header h2,
body[data-theme="dark"] .admin-modal-field > span {
  color: #eff6ff;
}
body[data-theme="dark"] .admin-modal-header p,
body[data-theme="dark"] .admin-modal-field small {
  color: #b8c7dc;
}
body[data-theme="dark"] .admin-modal-close,
body[data-theme="dark"] .admin-modal-cancel {
  border-color: rgba(96,165,250,.3);
  background: #10284a;
  color: #dbeafe;
}
body[data-theme="dark"] .admin-modal-field input,
body[data-theme="dark"] .admin-modal-field textarea,
body[data-theme="dark"] .admin-modal-field select {
  border-color: rgba(96,165,250,.3);
  background: rgba(5,18,38,.82);
  color: #f8fafc;
}
body[data-theme="dark"] .admin-report-actions button {
  color: #dbeafe;
}

/* CORRECAO: lightbox de imagens do chat */

/* CORRECAO: botão "Buscar CEP" abaixo do campo, largura total e mais visível */
.cep-actions {
  display: flex;
  margin-top: 8px;
  align-items: center;
}
.cep-actions .field-helper {
  flex: 1 1 100%;
  width: 100%;
  min-height: 42px;
  justify-content: center;
  text-align: center;
  margin: 0;
}

/* ── CHAT MODO WHATSAPP ─────────────────────────────────────── */

/* Quando conversa está aberta: esconde inbox e busca, maximiza thread */
.tab-panel[data-panel="chat"].has-open-chat .chat-search,
.tab-panel[data-panel="chat"].has-open-chat .chat-inbox {
  display: none !important;
}
/* CORRECAO v82: card vira coluna flex de altura fixa; a thread ocupa o espaco
   livre e ENCOLHE quando o painel da Lia abre, sem sobreposicao. */
.tab-panel[data-panel="chat"].has-open-chat .chat-card {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 132px);
  padding-bottom: 4px;
}
.tab-panel[data-panel="chat"].has-open-chat .chat-thread {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: none;
}

/* Back button */
.chat-back-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(15,44,97,.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* LIA button no chat: estado ativo */
.chat-lia-btn.active {
  background: linear-gradient(135deg, #4338ca, #7c3aed);
  box-shadow: 0 4px 14px rgba(99,60,220,.35);
}

/* chatAssist: slide in quando aberto */
.chat-assist.chat-assist-open {
  animation: assistIn .18s ease both;
}
@keyframes assistIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── LIGHTBOX REDESIGN ───────────────────────────────────────── */
body.lightbox-open { overflow: hidden !important; }

#chatLightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: rgba(0,0,0,.96);
  -webkit-overflow-scrolling: touch;
}
.lightbox-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  padding-top: max(12px, env(safe-area-inset-top));
  flex-shrink: 0;
  background: rgba(0,0,0,.6);
}
.lightbox-close {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 90px;
  min-height: 44px;
}
.lightbox-name {
  flex: 1;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox-download {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 44px;
}
.lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
}
.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-loading, .lightbox-error {
  color: rgba(255,255,255,.6);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}
.lightbox-error .btn-secondary {
  margin-top: 12px;
  border-color: rgba(255,255,255,.4);
  color: #fff;
  background: rgba(255,255,255,.12);
}


/* ═══════════════════════════════════════════════════════════════
   CONEXOES SUB-ABAS
   ═══════════════════════════════════════════════════════════════ */
.conn-subtabs {
  display: flex;
  background: #040d1f;
  border-bottom: 1px solid #1e3560;
  position: sticky;
  top: 0;
  z-index: 10;
  overflow-x: auto;
  scrollbar-width: none;
}
.conn-subtabs::-webkit-scrollbar { display: none; }
.conn-subtab {
  flex: 1 0 auto;
  padding: 14px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #4a7abf;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.conn-subtab.active {
  color: #4d9fff;
  border-bottom: 2px solid #4d9fff;
}
/* Atalho para o "Perfil para Conexões" (a aba fica no fim da barra rolavel) */
.conn-perfil-cta {
  display: block; width: calc(100% - 32px); margin: 4px 16px 12px;
  background: #eef3ff; color: #1e40af; border: 1.5px solid #c7d8f5;
  border-radius: 12px; padding: 13px 14px; font-size: 14px; font-weight: 800;
  cursor: pointer; text-align: center;
}
.conn-perfil-cta:active { transform: scale(.99); }
body[data-theme="dark"] .conn-perfil-cta { background: rgba(58,123,189,.12); color: #7db4ff; border-color: #1e3560; }
/* ===== Ouvidoria (aba Perfil) — layout proprio, mais polido ===== */
#ouvidoriaCard { border-top: 4px solid #2563eb; }
#ouvidoriaCard .card-title { font-size: 18px; }
#ouvidoriaCard > p { margin: 2px 0 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
#ouvidoriaCard label {
  display: block; margin: 14px 0 6px;
  font-size: 14px; font-weight: 700; color: var(--ink);
}
#ouvidoriaCard select,
#ouvidoriaCard input[type="text"],
#ouvidoriaCard textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink);
  font-size: 15px; font-family: inherit;
}
#ouvidoriaCard select:focus,
#ouvidoriaCard input[type="text"]:focus,
#ouvidoriaCard textarea:focus { border-color: #2563eb; outline: none; }
#ouvidoriaCard textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
#ouvidoriaCard #ouvEnviar { margin-top: 16px; width: 100%; padding: 15px; font-size: 16px; font-weight: 800; }
/* Feedback da Ouvidoria */
.ouv-feedback { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.ouv-feedback.ok { background: #ecfdf3; color: #15803d; border: 1px solid #86efac; }
.ouv-feedback.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
/* aviso LGPD no formulario */
/* aviso LGPD discreto (informativo, nao alarmante) */
.ouv-lgpd { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.ouv-lgpd b { color: var(--muted); font-weight: 700; }
body[data-theme="dark"] .ouv-lgpd { background: rgba(255,255,255,.03); border-color: var(--line); color: var(--muted); }
/* resumo privado da Lia no chat */
.assist-resumo { background: #eef3ff !important; color: #1e40af !important; font-weight: 800 !important; border: 1px solid #c7d8f5 !important; }
body[data-theme="dark"] .assist-resumo { background: rgba(58,123,189,.15) !important; color: #7db4ff !important; border-color: #1e3560 !important; }
.chat-assist-summary { white-space: pre-line; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 13px; line-height: 1.55; }
body[data-theme="dark"] .chat-assist-summary { background: rgba(255,255,255,.05); }
/* v82: resumo editavel/copiavel da Lia */
.lia-sum-head { font-size: 12px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.lia-sum-text {
  width: 100%;
  box-sizing: border-box;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  padding: 11px 12px;
  -webkit-user-select: text;
  user-select: text;
}
.lia-sum-text:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
body[data-theme="dark"] .lia-sum-text { background: rgba(255,255,255,.06); color: var(--ink); }
.lia-sum-actions { display: flex; gap: 8px; margin-top: 9px; }
.lia-sum-btn {
  flex: 1;
  min-height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.lia-sum-btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--line); }
/* Resumo da Lia em janela flutuante (bottom-sheet) — cabeçalho e botões fixos,
   texto rolando no meio. Resolve o resumo longo empurrando os botões da tela. */
.lia-sheet-overlay { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: flex-end; justify-content: center; }
.lia-sheet-backdrop { position: absolute; inset: 0; background: rgba(3,10,25,.62); backdrop-filter: blur(2px); }
.lia-sheet-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: #0f1b30;
  border: 1px solid rgba(124,58,237,.45);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 44px rgba(0,0,0,.5);
  animation: liaSheetUp .22s ease both;
}
@keyframes liaSheetUp { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.lia-sheet-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(147,197,253,.16);
}
.lia-sheet-title { font-size: 13px; font-weight: 800; color: #c7bcff; }
.lia-sheet-x {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2);
  color: #eaf2ff; font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
.lia-sheet-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.lia-sheet-body .lia-sum-text {
  width: 100%; box-sizing: border-box; min-height: 40vh; height: 100%;
  resize: none; border: 1px solid rgba(147,197,253,.22); border-radius: 12px;
  background: rgba(255,255,255,.06); color: #eaf2ff;
  font-family: inherit; font-size: 14px; line-height: 1.6; padding: 12px 13px;
  -webkit-user-select: text; user-select: text;
}
.lia-sheet-body .lia-sum-text:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(147,197,253,.22); }
.lia-sheet-foot {
  flex-shrink: 0;
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px calc(12px + var(--safe-bottom, 0px));
  border-top: 1px solid rgba(147,197,253,.16);
  background: rgba(9,17,32,.7);
}
.lia-sheet-foot .lia-sum-btn { flex: 1 1 auto; min-width: 88px; }
/* v84: Busca Inteligente com IA no Descobrir */
.smart-search-btn {
  width: 100%;
  margin: 14px 0 12px;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4338ca, #7c3aed);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,60,220,.28);
}
.smart-search-btn:disabled { opacity: .7; cursor: default; }
.smart-search-note {
  margin: 2px 2px 12px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(124,58,237,.10);
  border: 1px solid rgba(124,58,237,.28);
  font-size: 13px;
  font-weight: 700;
  color: #7c3aed;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
body[data-theme="dark"] .smart-search-note { background: rgba(124,58,237,.18); color: #c4b5fd; border-color: rgba(124,58,237,.4); }
.smart-clear {
  border: none;
  background: transparent;
  color: #7c3aed;
  font-weight: 800;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.admin-report-email-btn { width: 100%; margin-top: 6px; min-height: 46px; border-radius: 12px; background: linear-gradient(135deg, #0f2c61, #1e3a8a) !important; color: #fff !important; border: none !important; font-weight: 800 !important; font-size: 14px; cursor: pointer; }
.rel-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.rel-panel-title { font-size: 13px; font-weight: 800; color: var(--ink); }
.rel-check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; padding: 4px 0; }
.rel-check input { width: 18px; height: 18px; accent-color: #1e3a8a; flex-shrink: 0; }
.rel-panel-hint { font-size: 12px; color: var(--muted); }
.ouv-resp-list { display: flex; flex-direction: column; gap: 12px; }
.ouv-card { padding: 13px 14px; border: 1px solid var(--line); border-left: 4px solid #d4820a; border-radius: 12px; background: var(--card); }
.ouv-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ouv-card-head strong { font-size: 14px; color: var(--ink); }
.ouv-badge { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.ouv-badge.ouv-aberta { background: #fef3c7; color: #92400e; }
.ouv-badge.ouv-respondida { background: #dcfce7; color: #166534; }
.ouv-badge.ouv-em_analise { background: #dbeafe; color: #1e40af; }
.ouv-badge.ouv-encerrada { background: #e5e7eb; color: #374151; }
.ouv-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.ouv-msg { font-size: 13px; color: var(--ink); line-height: 1.5; background: rgba(15,44,97,.04); border-radius: 8px; padding: 9px 11px; margin-bottom: 9px; white-space: pre-line; }
body[data-theme="dark"] .ouv-msg { background: rgba(255,255,255,.05); }
.ouv-resp-input { width: 100%; box-sizing: border-box; min-height: 70px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 13px; line-height: 1.5; background: #fff; color: var(--ink); }
body[data-theme="dark"] .ouv-resp-input { background: rgba(255,255,255,.06); }
.ouv-resp-send { width: 100%; margin-top: 8px; min-height: 42px; border: none; border-radius: 10px; background: linear-gradient(135deg, #0f2c61, #1e3a8a); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.ouv-resp-send:disabled { opacity: .5; cursor: default; }
/* v98: acordeão (seções recolhíveis) */
.acc-card { padding: 0 !important; overflow: hidden; }
.acc-card > summary.acc-head {
  list-style: none;
  cursor: pointer;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.acc-card > summary.acc-head::-webkit-details-marker { display: none; }
.acc-card > summary.acc-head::after {
  content: "⌄";
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.acc-card[open] > summary.acc-head::after { transform: rotate(180deg); }
.acc-card > summary.acc-head:hover { color: var(--primary); }
.acc-card > .acc-body { padding: 0 16px 16px; animation: accIn .18s ease both; }
@keyframes accIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
/* v102: faixa "Associe-se" (modo nao associado) */
.assoc-banner { display: flex; align-items: center; gap: 10px; margin: 8px 12px 4px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(135deg, #d4820a, #b45309); color: #fff; box-shadow: 0 3px 10px rgba(180,83,9,.28); }
.assoc-banner-text { flex: 1; min-width: 0; font-size: 12px; line-height: 1.35; color: #fff; }
.assoc-banner-text strong { color: #fff; }
.assoc-banner-text b { color: #ffe9c7; }
.assoc-banner-btn { flex-shrink: 0; border: none; border-radius: 999px; background: #fff; color: #b45309; font-size: 12px; font-weight: 900; padding: 7px 14px; cursor: pointer; }
/* A faixa do topo cobre a mensagem — remove os avisos "nao associado" espalhados pelas telas */
.access-note.visitor { display: none !important; }
/* v105: catalogo de Produtos e Servicos */
.prod-intro { margin: 0 12px 12px; padding: 12px 14px; border-radius: 12px; background: rgba(58,123,189,.10); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink); }
.prod-card { margin: 0 12px 10px; }
.prod-card > summary.acc-head .prod-name { font-size: 14.5px; font-weight: 800; }
.prod-badge { display: inline-block; font-size: 10.5px; font-weight: 900; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 10px; }
.prod-badge.prod-inc { background: #dcfce7; color: #166534; }
.prod-badge.prod-serv { background: #dbeafe; color: #1e40af; }
.prod-img { display: block; width: 100%; height: auto; border-radius: 12px; margin-bottom: 10px; background: rgba(0,0,0,.03); }
.prod-o { font-size: 13px; line-height: 1.55; color: var(--ink); margin: 0 0 10px; }
.prod-benef { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.prod-benef li { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.prod-cta { display: block; text-align: center; text-decoration: none; padding: 11px; border-radius: 12px; background: linear-gradient(135deg, #0d3d26, #166534); color: #fff; font-size: 13px; font-weight: 800; }
.prod-gallery-wrap { margin: 0 0 12px; }
.prod-gallery-title { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.prod-gallery { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.prod-gthumb, .prod-gvid { flex: 0 0 auto; width: 110px; height: 84px; border-radius: 10px; object-fit: cover; cursor: pointer; background: rgba(0,0,0,.06); border: 1px solid var(--line); }
.prod-gvid { position: relative; overflow: hidden; }
.prod-gvid video { width: 100%; height: 100%; object-fit: cover; }
.prod-gplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; background: rgba(0,0,0,.35); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.prod-docs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.prod-doc { text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 11px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.prod-doc:hover { border-color: var(--primary); color: var(--primary); }
.prod-vbtn { border-color: #166534; color: #166534; }
body[data-theme="dark"] .prod-vbtn { border-color: #22c55e; color: #4ade80; }
/* v87: Agenda de Eventos — card no Inicio */
.agenda-home-card {
  margin: 0 12px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f2c61, #1e3a8a);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15,44,97,.28);
}
.agenda-home-month { font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #cbd5e1; margin-bottom: 10px; }
.agenda-home-item { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.12); }
.agenda-home-item:first-of-type { border-top: none; }
.agenda-home-day { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.16); color: #fff; font-size: 18px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.agenda-home-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agenda-home-txt strong { font-size: 14px; line-height: 1.25; }
.agenda-home-txt span { font-size: 12px; color: #c7d2fe; }
.agenda-home-empty { font-size: 13px; color: #dbe4f5; padding: 6px 2px; }
.agenda-home-cta { margin-top: 12px; text-align: center; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255,255,255,.14); border-radius: 10px; padding: 9px; }
/* Overlay tela cheia */
.agenda-overlay { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; background: var(--bg, #07152f); -webkit-overflow-scrolling: touch; }
.agenda-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(var(--safe-top,12px) + 8px) 12px 12px; background: #0f2c61; color: #fff; }
.agenda-close { background: rgba(255,255,255,.16); border: none; color: #fff; font-size: 14px; font-weight: 800; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.agenda-title { font-size: 16px; font-weight: 900; color: #fff; }
.agenda-monthbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #0f2c61; }
.agenda-nav { width: 40px; height: 40px; border-radius: 10px; border: none; background: rgba(255,255,255,.16); color: #fff; font-size: 20px; font-weight: 900; cursor: pointer; }
.agenda-month-select { flex: 1; height: 40px; border-radius: 10px; border: none; padding: 0 12px; font-size: 15px; font-weight: 800; background: #fff; color: #0f2c61; }
.agenda-body { flex: 1; overflow-y: auto; padding: 14px 12px 40px; }
.agenda-day { margin-bottom: 20px; }
.agenda-day-head { display: inline-block; font-size: 13px; font-weight: 900; color: var(--primary); text-transform: capitalize; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px; background: rgba(58,123,189,.12); }
.agenda-ev { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid #3a7bbd; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(15,44,97,.06); }
.agenda-ev-time { flex-shrink: 0; min-width: 98px; display: flex; flex-direction: row; align-items: baseline; gap: 4px; font-size: 16px; font-weight: 900; color: var(--primary); line-height: 1.1; }
.agenda-ev-end { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.agenda-ev-end::before { content: "→"; margin-right: 2px; }
.agenda-ev-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.agenda-ev-body strong { font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.agenda-ev-local { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.agenda-ev-local i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.agenda-chip { align-self: flex-start; font-size: 10px; font-weight: 800; color: #1f2937; padding: 3px 8px; border-radius: 999px; }
.agenda-empty { text-align: center; color: var(--muted); font-size: 14px; padding: 40px 16px; }

/* ===== Gestão de empresas (Admin: nível/Verificado/Âncora/esferas) ===== */
.gestao-list { display: flex; flex-direction: column; gap: 10px; }
.gestao-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); }
.gestao-name { font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.gestao-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.gestao-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.gestao-badge { font-size: 11px; font-weight: 800; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.gestao-badge.ok { background: #dcfce7; color: #15803d; border-color: #86efac; }
.gestao-badge.wait { background: #fef3c7; color: #92600a; border-color: #fcd34d; }
.gestao-badge.no { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.gestao-badge.anc { background: #eef2ff; color: #1e3a8a; border-color: #1e40af; }
.gestao-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gestao-actions button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 9px; padding: 8px 11px; font-size: 12px; font-weight: 700; cursor: pointer; }
.gestao-actions .gestao-ok { background: #dcfce7; color: #15803d; border-color: #86efac; }
.gestao-actions .gestao-no { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.gestao-esf { font-size: 13px; font-weight: 800; color: var(--ink); min-width: 46px; text-align: center; }
body[data-theme="dark"] .gestao-badge.ok, body[data-theme="dark"] .gestao-actions .gestao-ok { background: rgba(22,163,74,.16); color: #86efac; border-color: #14532d; }
body[data-theme="dark"] .gestao-badge.wait { background: rgba(245,158,11,.16); color: #fcd34d; border-color: #7c5a12; }
body[data-theme="dark"] .gestao-badge.no, body[data-theme="dark"] .gestao-actions .gestao-no { background: rgba(220,38,38,.16); color: #fca5a5; border-color: #7c1d1d; }
body[data-theme="dark"] .gestao-badge.anc { background: rgba(30,64,175,.20); color: #93c5fd; border-color: #1e40af; }
/* minhas manifestacoes (associado ve status + resposta) */
.ouv-minhas { margin-top: 16px; }
.ouv-minhas-title { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.ouv-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--card); }
.ouv-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ouv-tipo { font-size: 12px; font-weight: 800; color: var(--muted); }
.ouv-badge { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.ouv-badge.aberta { background: #e5e7eb; color: #475569; }
.ouv-badge.em_analise { background: #fef3c7; color: #92600a; }
.ouv-badge.respondida { background: #dcfce7; color: #15803d; }
.ouv-badge.encerrada { background: #e5e7eb; color: #64748b; }
.ouv-assunto { font-weight: 700; color: var(--ink); font-size: 13px; }
.ouv-msg { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.ouv-resp { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #ecfdf3; border: 1px solid #86efac; color: #14532d; font-size: 13px; line-height: 1.5; }
body[data-theme="dark"] .ouv-resp { background: rgba(22,163,74,.12); border-color: #14532d; color: #86efac; }
.ouv-wait { margin-top: 8px; font-size: 12px; color: var(--muted); font-style: italic; }

/* ===== Explicacao das Esferas (Descobrir) ===== */
.esferas-help { margin: 0 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.esferas-help summary { list-style: none; cursor: pointer; padding: 13px 14px; font-size: 14px; font-weight: 800; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.esferas-help summary::-webkit-details-marker { display: none; }
.esferas-help-chevron { transition: transform .25s ease; color: var(--muted); }
.esferas-help[open] .esferas-help-chevron { transform: rotate(180deg); }
.esferas-help-body { padding: 0 14px 14px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.esferas-help-body p { margin: 8px 0; }
.esferas-help-body ul { margin: 8px 0; list-style: none; }
.esferas-help-body li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.esferas-help-body li:last-child { border-bottom: none; }

/* ===== Animacoes profissionais (sutis) ===== */
@keyframes acFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes acPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.tab-panel.active > .container,
.tab-panel.active > .header,
.conn-subpanel.active > .container { animation: acFadeUp .34s ease both; }
.esferas-help[open] .esferas-help-body { animation: acFadeUp .26s ease both; }
button:active:not(:disabled) { transform: scale(.975); }
.nav-item { transition: color .16s ease, background .16s ease, transform .12s ease; }
.nav-item.active svg { animation: acPop .32s ease; }
.card { transition: box-shadow .22s ease, transform .18s ease; }
.lia-chip { animation: acPop .4s ease both; }
@media (prefers-reduced-motion: reduce) {
  .tab-panel.active > .container,
  .tab-panel.active > .header,
  .conn-subpanel.active > .container,
  .esferas-help[open] .esferas-help-body,
  .nav-item.active svg,
  .lia-chip { animation: none; }
  button:active:not(:disabled) { transform: none; }
}
.conn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f87171;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  border-radius: 99px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 3px;
  vertical-align: middle;
}
.conn-subpanel { display: none; }
.conn-subpanel.active { display: block; }

/* Convites */
.conn-convites-intro {
  background: #071a10;
  border: 1.5px solid #065f46;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0 10px;
}
.conn-convites-intro strong { display: block; color: #3dd68c; font-size: 16px; margin-bottom: 5px; }
.conn-convites-intro p { color: #adc8ea; font-size: 13px; line-height: 1.5; }
.convite-card { margin-bottom: 10px; }
.convite-msg {
  font-size: 11px;
  color: #7a9cc5;
  background: #0d2040;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  font-style: italic;
}
.convite-actions { display: flex; gap: 8px; margin-top: 10px; }
.convite-actions .btn { flex: 1; }

/* Descobrir */
.descobrir-search {
  width: 100%;
  margin: 12px 0 10px;
  padding: 10px 14px;
  background: #0d2040;
  border: 1.5px solid #1e3560;
  border-radius: 10px;
  color: #e8edf5;
  font-size: 13px;
}
.descobrir-search:focus { outline: none; border-color: #4d9fff; }
.descobrir-nivel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0a1f44;
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.descobrir-nivel-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}
.descobrir-nivel-pts { font-size: 10px; opacity: .85; }
.descobrir-nivel-hint { font-size: 10px; color: #4a7abf; flex: 1; }
.descobrir-card { margin-bottom: 10px; }
.descobrir-locked { opacity: .65; }
.descobrir-locked .company-head h3 { color: #7a9cc5; }
.descobrir-lock-badge {
  font-size: 9px;
  font-weight: 700;
  border: 1px solid;
  border-radius: 8px;
  padding: 5px 8px;
  flex-shrink: 0;
  text-align: center;
  white-space: nowrap;
}
.descobrir-lock-info {
  font-size: 10px;
  color: #4a7abf;
  margin-top: 8px;
  padding: 8px 10px;
  background: #0d2040;
  border-radius: 8px;
}
.descobrir-conectar { flex-shrink: 0; font-size: 12px; padding: 8px 14px; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════
   ABA CRM — ACOMPANHAMENTO
   ═══════════════════════════════════════════════════════════════ */
.crm-intro-text {
  font-size: 12px;
  color: #9db6da;
  line-height: 1.5;
  margin: 12px 0 12px;
  padding: 0 2px;
}
.crm-funil-header { margin-bottom: 4px; }

/* Acompanhamento: painel de topo (KPIs + Exportar) num card único */
.crm-panel {
  background: linear-gradient(180deg, rgba(18,40,74,.55), rgba(10,24,50,.4));
  border: 1px solid rgba(147,197,253,.16);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.crm-topbar { display: flex; align-items: stretch; gap: 10px; }
.crm-kpis { display: flex; gap: 8px; flex: 1 1 auto; min-width: 0; }
.crm-kpi {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 9px 10px; border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-left-width: 3px;
}
.crm-kpi b { font-size: 20px; font-weight: 800; line-height: 1; color: #eaf2ff; }
.crm-kpi span { font-size: 10px; font-weight: 600; color: #9db0c9; margin-top: 3px; line-height: 1.2; }
.crm-kpi.kpi-total { border-left-color: #60a5fa; }
.crm-kpi.kpi-act { border-left-color: #f2b455; }
.crm-kpi.kpi-act b { color: #f7c877; }
.crm-kpi.kpi-idle { border-left-color: #ef7a7a; }
.crm-kpi.kpi-idle b { color: #f39a9a; }
.crm-kpi.zero { opacity: .5; }
.crm-kpi.zero b { color: #9db0c9; }
.crm-alert {
  background: #1a0808;
  border: 1.5px solid #991b1b;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #f87171;
  margin-bottom: 10px;
}
.crm-stage-pills {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
}
.crm-stage-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  min-width: 72px;
  flex-shrink: 0;
  transition: background .2s;
}
.crm-stage-active { box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.crm-stage-count { font-size: 20px; font-weight: 800; line-height: 1; }
.crm-stage-name { font-size: 9px; font-weight: 600; color: #7a9cc5; text-align: center; margin-top: 3px; }
.crm-stage-active .crm-stage-name { color: inherit; }
.crm-arrow { color: #1e3560; font-size: 18px; padding: 0 3px; flex-shrink: 0; }
.crm-pills-hint {
  font-size: 10px;
  color: #2d4a7a;
  text-align: center;
  margin: 0 0 14px;
}
/* Acompanhamento: busca, filtros e resultado da negociação */
.crm-search-wrap { margin: 6px 0 8px; }
.crm-search {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); color: var(--ink);
  font-size: 13.5px; padding: 10px 12px; font-family: inherit;
}
.crm-search:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(147,197,253,.22); }
body[data-theme="dark"] .crm-search { background: rgba(255,255,255,.06); color: #eaf2ff; }
.crm-fchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.crm-fchip {
  flex: 0 0 auto; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(147,197,253,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(238,244,251,.55));
  color: #274063;
  border-radius: 12px; padding: 8px 13px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; backdrop-filter: blur(4px);
  transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease;
}
.crm-fchip:active { transform: scale(.96); }
.crm-fchip.on {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 6px 18px rgba(37,99,235,.4), inset 0 0 0 1px rgba(255,255,255,.25);
}
.crm-fbadge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 900; line-height: 1;
  background: rgba(37,99,235,.14); color: #2563eb;
}
.crm-fchip.on .crm-fbadge { background: rgba(255,255,255,.28); color: #fff; }
body[data-theme="dark"] .crm-fchip {
  background: linear-gradient(180deg, rgba(30,48,91,.7), rgba(15,27,48,.6));
  border-color: rgba(125,211,252,.22); color: #cfe0f5;
}
body[data-theme="dark"] .crm-fchip.on {
  background: linear-gradient(135deg, #2563eb, #6d28d9); color: #fff;
  box-shadow: 0 6px 20px rgba(88,80,236,.5), inset 0 0 0 1px rgba(255,255,255,.22);
}
body[data-theme="dark"] .crm-fbadge { background: rgba(125,211,252,.18); color: #bfdbfe; }
body[data-theme="dark"] .crm-fchip.on .crm-fbadge { background: rgba(255,255,255,.26); color: #fff; }
.crm-out { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.crm-out-win { background: rgba(34,197,94,.16); color: #15803d; border: 1px solid rgba(34,197,94,.4); }
.crm-out-lost { background: rgba(220,38,38,.14); color: #b91c1c; border: 1px solid rgba(220,38,38,.35); }
body[data-theme="dark"] .crm-out-win { color: #86efac; }
body[data-theme="dark"] .crm-out-lost { color: #fca5a5; }
.crm-out-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 8px 0 2px; }
.crm-out-pick > span { font-size: 11.5px; font-weight: 700; color: #64748b; width: 100%; }
body[data-theme="dark"] .crm-out-pick > span { color: #9fb2cc; }
.crm-out-btn { flex: 1; min-width: 130px; border-radius: 9px; padding: 8px 10px; font-size: 12.5px; font-weight: 800; cursor: pointer; border: 1px solid; }
.crm-out-btn.win { background: rgba(34,197,94,.14); color: #15803d; border-color: rgba(34,197,94,.45); }
.crm-out-btn.lost { background: rgba(220,38,38,.10); color: #b91c1c; border-color: rgba(220,38,38,.4); }
body[data-theme="dark"] .crm-out-btn.win { color: #86efac; }
body[data-theme="dark"] .crm-out-btn.lost { color: #fca5a5; }
.crm-kbtn.crm-ia { background: rgba(124,58,237,.12); border-color: rgba(124,58,237,.5); color: #7c3aed; }
body[data-theme="dark"] .crm-kbtn.crm-ia { background: rgba(124,58,237,.22); color: #c4b5fd; border-color: rgba(124,58,237,.5); }
/* Botão da Lia no canto do card + balãozinho */
.crm-ia-fab {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, #a78bfa, #6d28d9);
  box-shadow: 0 4px 14px rgba(109,40,217,.45), inset 0 0 0 1px rgba(255,255,255,.25);
  animation: iaFabPulse 2.6s ease-in-out infinite;
}
.crm-ia-fab:active { transform: scale(.94); }
.crm-ia-spark { color: #fff; font-size: 18px; line-height: 1; filter: drop-shadow(0 0 5px rgba(255,255,255,.7)); }
@keyframes iaFabPulse {
  0%,100% { box-shadow: 0 4px 14px rgba(109,40,217,.45), inset 0 0 0 1px rgba(255,255,255,.25); }
  50%     { box-shadow: 0 4px 22px rgba(124,58,237,.75), inset 0 0 0 1px rgba(255,255,255,.35); }
}
.crm-ia-tip {
  position: absolute; top: 50%; right: calc(100% + 8px); transform: translateY(-50%);
  white-space: nowrap; font-style: normal; font-size: 11.5px; font-weight: 700;
  color: #fff; background: #6d28d9; padding: 7px 11px; border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.crm-ia-tip::after {
  content: ""; position: absolute; top: 50%; left: 100%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #6d28d9;
}
.crm-ia-fab:hover .crm-ia-tip, .crm-ia-fab:focus .crm-ia-tip { opacity: 1; transform: translateY(-50%) translateX(-2px); }

/* Janela da sugestão (reusa .lia-sheet-*) */
.ia-passo-body { text-align: center; }
.ia-passo-load { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 8px; }
.ia-passo-orb {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #a78bfa, #6d28d9);
  box-shadow: 0 0 0 0 rgba(124,58,237,.5); animation: iaOrb 1.3s ease-in-out infinite;
}
@keyframes iaOrb { 0%,100% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(124,58,237,.5); } 50% { transform: scale(1.05); box-shadow: 0 0 0 14px rgba(124,58,237,0); } }
.ia-passo-load p { margin: 0; color: #eaf2ff; font-size: 14px; font-weight: 700; }
.ia-passo-load small { color: #9fb2cc; font-size: 11.5px; }
.ia-passo-msg { padding: 22px 12px; color: #cdd8ec; font-size: 13.5px; line-height: 1.5; }
.ia-passo-result { padding: 16px 10px; }
.ia-passo-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #c4b5fd; background: rgba(124,58,237,.2); border: 1px solid rgba(124,58,237,.5); padding: 4px 11px; border-radius: 999px; }
.ia-passo-acao { margin: 12px 0 0; color: #ffffff; font-size: 17px; font-weight: 800; line-height: 1.4; }
.crm-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 0;
}
.crm-card-stage-bar {
  height: 4px;
  width: 100%;
}
.crm-card-body { padding: 12px 14px 14px; }
.crm-stage-badge {
  font-size: 9px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
  flex-shrink: 0;
  white-space: nowrap;
}
.crm-lembrete {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #1a0808;
  border: 1.5px solid #991b1b;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 10px 0 8px;
  font-size: 11px;
  color: #f87171;
}
.crm-lembrete span { font-size: 16px; flex-shrink: 0; }
.crm-lembrete strong { color: #fca5a5; }
.crm-card-actions { display: flex; gap: 8px; margin-top: 10px; }
.crm-btn {
  flex: 1;
  padding: 9px 6px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid;
  text-align: center;
}
.crm-btn-chat {
  background: #071a10;
  border-color: #065f46;
  color: #3dd68c;
}
.crm-btn-avancar {
  background: #0a1f44;
  border-color: #1e5aaa;
  color: #4d9fff;
}
.crm-btn-manage {
  background: #221a05;
  border-color: #8a6d1e;
  color: #f0c14b;
}
.crm-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.crm-chip {
  font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
  background: var(--line); color: var(--muted);
  border: 1px solid var(--line);
}
.crm-chip.warn { background: #fef3c7; color: #92600a; border-color: #fcd34d; }
.crm-chip.danger { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.crm-notes-preview {
  margin-top: 8px; font-size: 12px; line-height: 1.4;
  color: var(--ink); background: var(--bg);
  border-left: 2px solid var(--primary); border-radius: 0 8px 8px 0; padding: 8px 10px;
}
.crm-notes-preview strong { color: var(--primary); }
.crm-export-btn {
  flex: 0 0 auto; align-self: stretch;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: linear-gradient(135deg, #2563eb, #4338ca);
  color: #fff; border: 1px solid transparent;
  border-radius: 12px; padding: 0 16px; min-width: 74px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(37,99,235,.32);
  transition: transform .12s ease, box-shadow .12s ease;
}
.crm-export-btn:hover { box-shadow: 0 6px 18px rgba(37,99,235,.48); }
.crm-export-btn:active { transform: scale(.96); }
.crm-export-btn .crm-export-ic { font-size: 16px; line-height: 1; }
.crm-alert.idle { color: #fcd34d; border-color: rgba(245,158,11,.4); }

/* CRM lista vertical por etapa (com "Mover para...") */
.crm-vsection { margin-bottom: 18px; }
.crm-vhead { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.crm-vhead strong { font-size: 14px; font-weight: 800; color: var(--ink); flex: 1; }
.crm-vhead b { font-size: 12px; font-weight: 800; color: var(--muted); background: var(--line); border-radius: 999px; min-width: 22px; text-align: center; padding: 1px 7px; }
.crm-vdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.crm-vcard { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.crm-vcard-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.crm-move, .crm-kbtn { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; height: 34px; min-width: 34px; padding: 0 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
/* CRM: ações do card em duas fileiras (navegação + ferramentas), encorpadas */
.crm-vcard-actions { display: flex; flex-direction: column; gap: 8px; }
.crm-act-row { display: flex; gap: 8px; }
.crm-act-row > button { flex: 1 1 0; min-width: 0; height: 42px; padding: 0 6px;
  white-space: nowrap; font-weight: 700; font-size: 13px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.crm-act-row > button:active { transform: scale(.96); }
/* Navegação de etapa */
.crm-move.back { background: rgba(255,255,255,.05); border: 1px solid var(--line); color: #c3d5ea; }
.crm-move.mover { background: rgba(58,123,189,.16); border: 1px solid rgba(96,165,250,.4); color: #cfe6ff; }
.crm-move.fwd { background: linear-gradient(135deg,#2563eb,#4338ca); border: 1px solid transparent;
  color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.35); }
.crm-move.fwd:hover { box-shadow: 0 6px 18px rgba(37,99,235,.5); }
/* Ferramentas */
.crm-act-tools > button.crm-kbtn.labeled { background: rgba(242,208,137,.1);
  border: 1px solid rgba(242,208,137,.32); color: #f2d089; }
.crm-act-tools > button[data-chat-company] { background: rgba(37,211,102,.12);
  border: 1px solid rgba(37,211,102,.4); color: #7ee2a8; }
/* Acompanhamento: guia "Como usar" recolhível (discreto, profissional) */
.crm-guide {
  margin: 0 0 16px; border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(147,197,253,.14);
  overflow: hidden;
}
.crm-guide > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; font-size: 12.5px; font-weight: 700; color: #b9cae2;
}
.crm-guide > summary::-webkit-details-marker { display: none; }
.crm-guide .crm-guide-ic { font-size: 15px; }
.crm-guide .crm-guide-title { flex: 1; }
.crm-guide .crm-guide-chev { color: #7d94b3; transition: transform .2s ease; }
.crm-guide[open] .crm-guide-chev { transform: rotate(180deg); }
.crm-guide-body { padding: 2px 14px 14px; display: grid; gap: 8px; }
.crm-guide-item {
  display: flex; flex-direction: column; gap: 1px;
  padding: 9px 11px; border-radius: 10px;
  background: rgba(58,123,189,.08);
  border-left: 3px solid rgba(147,197,253,.35);
}
.crm-guide-item b { color: #f2d089; font-size: 12.5px; font-weight: 800; }
.crm-guide-item span { color: #b9cae2; font-size: 11.5px; line-height: 1.35; }
.crm-move-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 12px; margin-bottom: 8px; font-size: 14px; cursor: pointer; }
.crm-move-opt:disabled { opacity: .5; cursor: default; }
.crm-col-empty { font-size: 12px; color: var(--muted); padding: 4px 4px 10px; opacity: .55; }

/* Dark mode inputs e selects */
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background: #0a1f44;
  border-color: #1e3560;
  color: #e8edf5;
}
body[data-theme="dark"] input::placeholder { color: #4a7abf; }
body[data-theme="dark"] input:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus {
  border-color: #4d9fff;
  outline: none;
}

/* Dark mode botao primario */
body[data-theme="dark"] .btn.btn-primary,
body[data-theme="dark"] button.btn-primary {
  background: #1a4f8c;
  color: #dde6f0;
  border-color: #1a4f8c;
}
body[data-theme="dark"] .btn.btn-secondary,
body[data-theme="dark"] button.btn-secondary {
  background: #0a1c38;
  color: #6b8aad;
  border-color: #18305a;
}

/* Dark mode section-title */
body[data-theme="dark"] .section-title {
  color: #6b8aad;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-size: 11px;
}

/* Dark mode status pills */
body[data-theme="dark"] .status-pill {
  background: #0a1c38;
  color: #6b8aad;
  border: 1px solid #18305a;
}

/* Dark mode connection stage filter buttons */
body[data-theme="dark"] #connectionStageFilters button {
  background: #0a1c38;
  border-color: #18305a;
  color: #4a6a8a;
}
body[data-theme="dark"] #connectionStageFilters button.active {
  background: #1a4f8c;
  border-color: #3a7bbd;
  color: #dde6f0;
}

/* Dark mode sub-abas conexoes */
body[data-theme="dark"] .conn-subtabs {
  background: #040d1f;
  border-color: #18305a;
}
body[data-theme="dark"] .conn-subtab { color: #4a6a8a; }
body[data-theme="dark"] .conn-subtab.active { color: #3a7bbd; border-color: #3a7bbd; }

/* Dark mode header gradiente - linha colorida */
body[data-theme="dark"] .header::after {
  background: linear-gradient(90deg, #2d6ab4, #18305a, #2d6ab4);
}

/* Dark mode company brand/avatar */
body[data-theme="dark"] .avatar {
  background: #0a1f44;
  color: #4d9fff;
  border: 2px solid #1e5aaa;
}

/* Dark mode filter row buttons */
body[data-theme="dark"] .filter-row button,
body[data-theme="dark"] .filter-pill {
  background: #0a1c38;
  border-color: #18305a;
  color: #4a6a8a;
}
body[data-theme="dark"] .filter-row button.active,
body[data-theme="dark"] .filter-pill.active {
  background: #1a4f8c;
  color: #dde6f0;
  border-color: #3a7bbd;
}

/* Dark mode search input */
body[data-theme="dark"] #companySearch,
body[data-theme="dark"] #connectionSearch,
body[data-theme="dark"] #descobrirSearch {
  background: #0a1f44;
  border-color: #1e3560;
  color: #e8edf5;
}

/* Dark mode chat bubbles */
body[data-theme="dark"] .chat-bubble {
  background: #0d2040;
  border-color: #1e3560;
  color: #e8edf5;
}
body[data-theme="dark"] .chat-line.mine .chat-bubble {
  background: #1d5ec7;
  color: #fff;
}

/* Dark mode company-text paragrafo */
body[data-theme="dark"] .company-text p,
body[data-theme="dark"] .company-text span {
  color: #7a9cc5;
}

/* Dark mode label e texto muted */
body[data-theme="dark"] label { color: #7a9cc5; }
body[data-theme="dark"] p { color: #7a9cc5; }

/* Dark mode notification */
body[data-theme="dark"] .notification-panel {
  background: linear-gradient(180deg, #0d2040, #07152f);
}

/* CRM corporativo — paleta sobria */
body[data-theme="dark"] .crm-stage-pill {
  background: #0a1c38;
  color: #6b8aad;
  border: 1.5px solid #18305a;
}
body[data-theme="dark"] .crm-stage-pill.active {
  background: #1a4f8c;
  color: #dde6f0;
  border-color: #3a7bbd;
}
body[data-theme="dark"] .crm-card {
  background: #0c1e3a;
  border-color: #18305a;
}
/* CRM no modo escuro: mantem chips/notas no tom original (o modo claro usa variaveis) */
body[data-theme="dark"] .crm-chip { background: rgba(255,255,255,.06); color: #b6c4dc; border-color: rgba(255,255,255,.08); }
body[data-theme="dark"] .crm-chip.warn { background: rgba(245,158,11,.14); color: #fcd34d; border-color: rgba(245,158,11,.3); }
body[data-theme="dark"] .crm-chip.danger { background: rgba(220,38,38,.16); color: #fca5a5; border-color: rgba(220,38,38,.35); }
body[data-theme="dark"] .crm-notes-preview { color: #c7d4ec; background: rgba(255,255,255,.04); border-left-color: #3a7bbd; }
body[data-theme="dark"] .crm-notes-preview strong { color: #9fc0e8; }
body[data-theme="dark"] .crm-move, body[data-theme="dark"] .crm-kbtn { background: rgba(255,255,255,.06); color: #cdd8ec; border-color: rgba(255,255,255,.14); }
body[data-theme="dark"] .crm-move-opt { background: rgba(255,255,255,.05); color: #eaf1ff; border-color: rgba(255,255,255,.1); }
body[data-theme="dark"] .crm-vhead b { background: rgba(255,255,255,.08); color: #cbd5e1; }
body[data-theme="dark"] .crm-export-btn { background: rgba(255,255,255,.08); color: #cdd8ec; border-color: rgba(255,255,255,.14); }
body[data-theme="dark"] .crm-lembrete {
  background: #0d1f35;
  border-color: #1e3560;
  color: #6b8aad;
}
body[data-theme="dark"] .descobrir-locked {
  border-color: #18305a;
  opacity: .65;
}
body[data-theme="dark"] .descobrir-lock-badge {
  background: #0a1c38;
  color: #4a6a8a;
  border-color: #18305a;
}
body[data-theme="dark"] .descobrir-nivel {
  background: #0a1c38;
  border-color: #18305a;
}

/* Beneficios cards */
body[data-theme="dark"] 
body[data-theme="dark"] .beneficio-card h3 {
  color: #dde6f0;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
body[data-theme="dark"] .beneficio-card p {
  color: #6b8aad;
  font-size: 12px;
  line-height: 1.5;
}
.beneficio-card { border-radius: 14px; padding: 16px; margin-bottom: 10px; border: 1px solid var(--line); background: var(--card); }
.beneficio-card h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.beneficio-card p { font-size: 12px; color: var(--muted); line-height: 1.5; }
.beneficio-icon { width: 38px; height: 38px; border-radius: 10px; background: rgba(58,123,189,.12); border: 1px solid rgba(58,123,189,.25); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px; flex-shrink: 0; }

/* =====================================================
   FEED — Stories
   ===================================================== */
.feed-stories-wrap {
  padding: 12px 0 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.feed-stories-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
}
.feed-stories-row::-webkit-scrollbar { display: none; }
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  cursor: pointer;
}
.story-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
}
.story-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.story-avatar.has-logo { background: #fff !important; }
.story-avatar.has-logo img { object-fit: contain; padding: 6px; }
.story-avatar.official { box-shadow: 0 0 0 2px #f5a623, 0 0 0 4px rgba(245,166,35,.35); }
.story-add-avatar { background: var(--card) !important; border: 2px dashed #2563eb; font-size: 26px; font-weight: 400; color: #2563eb; }

/* Visualizador de stories (tela cheia, estilo Instagram) */
.sv-bars { display: flex; gap: 4px; padding: calc(var(--safe-top,12px) + 8px) 10px 0; position: relative; z-index: 20; }
.sv-bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.sv-bar span { display: block; height: 100%; width: 0; background: #fff; }
.sv-bar.done span { width: 100%; }
.sv-bar.active span { width: 100%; transition: width 5s linear; }
.sv-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; color: #fff; position: relative; z-index: 20; }
.sv-author { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sv-official { background: #f5a623; color: #3a2400; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; }
.sv-x { background: rgba(255,255,255,.16); color: #fff; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.sv-media { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sv-legenda { color: #fff; background: rgba(0,0,0,.45); padding: 12px 16px calc(var(--safe-bottom,0px) + 14px); font-size: 14px; line-height: 1.4; }
.sv-tap { position: absolute; top: 96px; bottom: 90px; width: 26%; z-index: 5; }
.sv-legenda { position: relative; z-index: 20; }
.sv-tap.left { left: 0; }
.sv-tap.right { right: 0; }
.story-item span {
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =====================================================
   FEED — Secoes
   ===================================================== */
.feed-section { padding: 14px 0 0; }
.feed-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 10px;
}
.feed-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.feed-see-all {
  font-size: 12px;
  color: var(--primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
}

/* Videos */
.feed-videos-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 14px;
  scrollbar-width: none;
}
.feed-videos-row::-webkit-scrollbar { display: none; }
.feed-video-card { flex-shrink: 0; width: 128px; }
.feed-video-thumb {
  width: 128px;
  height: 76px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid var(--line);
}
.feed-video-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}
.feed-video-type {
  position: absolute;
  bottom: 5px; left: 5px;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.feed-video-title {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

/* Noticias */
.feed-featured-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 16px 10px;
}
.feed-featured-thumb {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.feed-featured-body { padding: 12px; }
.feed-cat-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}
.feed-featured-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin: 0;
}
.feed-news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 14px;
}
.feed-news-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.feed-news-thumb {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.feed-news-body { padding: 8px; }
.feed-news-cat {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 3px;
}
.feed-news-title {
  font-size: 11px;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
}

/* =====================================================
   BENEFICIOS — Lista estilo iOS
   ===================================================== */
.benef-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
}
.benef-list-item:active { opacity: 0.7; }
.benef-list-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.benef-list-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.benef-list-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.benef-list-sub {
  font-size: 12px;
  color: var(--muted);
}
.benef-list-arrow { color: var(--muted); flex-shrink: 0; }
.benef-indica-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  margin-top: 4px;
}
.benef-indica-card:active { opacity: 0.7; }

/* CRM sempre visivel no nav */
.crm-nav[hidden] { display: flex !important; }

/* CRM sempre visivel no nav */
.crm-nav { display: flex !important; }

/* Beneficios header com botao busca */
.benef-header-btn { background:none;border:none;padding:8px;color:var(--muted);cursor:pointer; }

/* Feed container sem padding lateral (para stories full-bleed) */
[data-panel="inicio"] { padding: 0 !important; }
[data-panel="inicio"] .feed-section { padding-left: 0; padding-right: 0; }

/* Nav — 5 items layout otimizado */
.bottom-nav { display: flex; justify-content: space-around; }
.bottom-nav .nav-item[hidden] { display: none !important; }


/* ============================================================
   FIXES GERAIS — cores, sobreposição, modo claro/escuro
   ============================================================ */

/* Garantir que company-head nao sobreponha botao */
.descobrir-card .company-head {
  flex-wrap: nowrap;
  align-items: center;
}
.descobrir-card .company-text h3 {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.descobrir-card .company-text p {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Remove Painel do nav */
.dashboard-nav { display: none !important; }

/* Feed — cores corretas em ambos os modos */
.feed-stories-wrap { background: var(--bg); }
.feed-section-title { color: var(--ink); }
.feed-see-all { color: var(--primary); }
.feed-featured-card { background: var(--card); border-color: var(--line); }
.feed-featured-title { color: var(--ink); }
.feed-news-card { background: var(--card); border-color: var(--line); }
.feed-news-title { color: var(--ink); }
.feed-video-card .feed-video-title { color: var(--muted); }

/* Feed thumb em modo claro */
:root .feed-featured-thumb { background: var(--line); }
:root .feed-news-thumb { background: var(--line); }
body[data-theme="dark"] .feed-featured-thumb { background: var(--card); }
body[data-theme="dark"] .feed-news-thumb { background: var(--card); border-color: var(--line); }

/* Beneficios lista — modo claro */
.benef-list-item { background: var(--card); border-color: var(--line); }
.benef-list-title { color: var(--ink); }
.benef-list-sub { color: var(--muted); }
.benef-indica-card { background: var(--card); border-color: var(--line); }

/* Cards noticias clicaveis */
.feed-news-card, .feed-featured-card, .feed-video-card { cursor: pointer; }
.feed-news-card:active, .feed-featured-card:active, .feed-video-card:active { opacity: 0.75; }

/* Modal video */
.video-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.video-modal-close {
  position: absolute; top: 48px; right: 20px;
  background: rgba(255,255,255,0.15); border: none;
  border-radius: 50%; width: 36px; height: 36px;
  color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.video-modal-content {
  width: 90%; max-width: 400px;
  background: #0c1e3a; border-radius: 16px;
  padding: 20px; text-align: center;
}
.video-modal-thumb {
  width: 100%; height: 180px;
  background: #07152f; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.video-modal-title {
  font-size: 15px; font-weight: 700; color: #dde6f0;
  margin-bottom: 8px;
}
.video-modal-desc {
  font-size: 12px; color: #6b8aad; line-height: 1.5;
}
.video-play-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: #3a7bbd; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Noticia modal */
.noticia-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: flex-end;
}
.noticia-modal-sheet {
  width: 100%; background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 40px 20px;
  max-height: 70vh; overflow-y: auto;
}
.noticia-modal-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--line); margin: 0 auto 16px auto;
}
.noticia-modal-cat {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 8px; display: block;
}
.noticia-modal-title {
  font-size: 16px; font-weight: 700; color: var(--ink);
  line-height: 1.4; margin-bottom: 10px;
}
.noticia-modal-body {
  font-size: 13px; color: var(--muted); line-height: 1.6;
}

/* Bottom nav — garantir 5 itens visiveis espaçados */
.bottom-nav { gap: 0; }
.bottom-nav .nav-item { flex: 1; }

/* ============================================================
   LOGIN SCREEN — correcao completa modo escuro/claro
   ============================================================ */

/* Card principal adaptativo */
.login-card {
  background: var(--card) !important;
  color: var(--ink) !important;
}
.login-card h1 { color: var(--ink); }
.login-card > p { color: var(--muted); }

/* Service cards adaptativos */
.public-routing-card,
.public-services-card {
  background: var(--bg) !important;
  border-color: var(--line) !important;
}
.public-routing-card strong,
.public-services-card strong {
  color: var(--ink) !important;
}
.public-routing-card small,
.public-services-card span {
  color: var(--muted) !important;
  opacity: 1;
}
.public-routing-card span { color: var(--primary) !important; }
.public-routing-card:hover {
  background: var(--card) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 14px rgba(58,123,189,0.15) !important;
}

/* Auth tabs adaptativos */
.auth-tabs {
  background: var(--bg) !important;
  border: 1px solid var(--line);
}
.auth-tabs button { color: var(--muted) !important; }
.auth-tabs button.active {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(58,123,189,0.3);
}

/* Inputs adaptativos */
#login-screen input,
#login-screen select,
#login-screen textarea {
  background: var(--bg) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
#login-screen input::placeholder { color: var(--muted) !important; }

/* Rótulos de CAMPO: simples e discretos (não confundir com título de seção). */
#login-screen label {
  display: block; margin: 12px 0 6px;
  color: #cfe0f5 !important; font-size: 13px; font-weight: 700;
  background: none !important; border: none !important; box-shadow: none !important;
  padding: 0 !important; letter-spacing: 0;
}
/* Títulos de SEÇÃO: barra azul moderna com texto claro — visualmente distinta
   dos rótulos de campo, para o usuário perceber que começou um novo bloco. */
#login-screen .form-section-label {
  display: flex; align-items: center; gap: 11px;
  margin: 24px 0 14px; padding: 12px 16px;
  color: #7fbaff !important; font-size: 13px; font-weight: 900;
  letter-spacing: .12em; text-transform: uppercase;
  text-shadow: 0 0 10px rgba(96,165,250,.55);
  background: rgba(10,22,45,.55);
  border: 1.6px solid #3b82f6; border-radius: 12px;
  box-shadow: 0 0 14px rgba(59,130,246,.55), inset 0 0 14px rgba(59,130,246,.14);
}
#login-screen .form-section-label::before {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%;
  background: #60a5fa; box-shadow: 0 0 10px 2px rgba(96,165,250,.9);
}

/* SEGURANÇA E LGPD box */
.public-services-card {
  background: var(--bg) !important;
  border-color: var(--line) !important;
}
.public-services-card small,
.public-services-card p { color: var(--muted) !important; }

/* Fundo da tela login no modo escuro */
body[data-theme="dark"] #login-screen {
  background:
    radial-gradient(900px 520px at 20% -10%, #0d2a5a 0%, transparent 58%),
    radial-gradient(600px 400px at 80% 110%, #071528 0%, transparent 55%),
    #07152f;
}

/* Fundo da tela login no modo claro */
body:not([data-theme="dark"]) #login-screen {
  background:
    radial-gradient(900px 520px at 20% -10%, #dbeafe 0%, transparent 58%),
    radial-gradient(600px 400px at 80% 110%, #eff6ff 0%, transparent 55%),
    #f6f8fc;
}

/* Demo link */
.demo-link { color: var(--primary) !important; }

/* Login brand area */
.login-brand-video { display: none; }

/* ============================================================
   ADMIN / DASHBOARD — correcao completa de cores (ambos modos)
   ============================================================ */

/* Cards de prioridade (VISÃO EXECUTIVA, USUÁRIOS, etc.) */
.admin-dashboard-priority {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.admin-dashboard-priority span {
  color: var(--primary) !important;
}
.admin-dashboard-priority strong {
  color: var(--ink) !important;
}
.admin-dashboard-priority small {
  color: var(--muted) !important;
}

/* Summary card */
.admin-dashboard-summary {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.admin-dashboard-summary span { color: var(--muted) !important; }
.admin-dashboard-summary strong { color: var(--ink) !important; }
.admin-dashboard-summary small { color: var(--muted) !important; }

/* Support/service cards */
.admin-support-card {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.admin-support-card strong { color: var(--ink) !important; }
.admin-support-card span { color: var(--muted) !important; }

/* Dashboard tile */
.dashboard-tile {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.dashboard-tile strong { color: var(--primary) !important; }
.dashboard-tile span { color: var(--muted) !important; }

/* Dashboard summary */
.dashboard-split-note {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.dashboard-split-note strong { color: var(--ink) !important; }
.dashboard-split-note span { color: var(--muted) !important; }

/* Admin head */
.admin-head {
  background: linear-gradient(135deg, var(--primary) 0%, #18305a 100%) !important;
}

/* Admin sync bar */
.admin-sync-bar {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.admin-sync-bar strong { color: var(--ink) !important; }
.admin-sync-bar span { color: var(--muted) !important; }
.admin-sync-bar.online {
  border-color: #27ae60 !important;
  background: linear-gradient(135deg, #0d3d26 0%, var(--card) 100%) !important;
}

/* Admin debug strip */
.admin-debug-strip {
  background: var(--bg) !important;
  border-color: var(--line) !important;
}
.admin-debug-strip span { color: var(--muted) !important; }

/* Admin mobile nav (dropdown de seção) */
.admin-mobile-nav-toggle {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
.admin-mobile-nav-toggle small { color: var(--muted) !important; }
.admin-mobile-nav-toggle strong { color: var(--ink) !important; }

/* Admin section list rows */
.admin-row, .admin-process {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.admin-row strong, .admin-process strong { color: var(--ink) !important; }
.admin-row span, .admin-process span { color: var(--muted) !important; }

/* Admin report summary */
.admin-report-summary-grid > div {
  background: var(--card) !important;
  border-color: var(--line) !important;
}

/* Admin dashboard priorities section */
.admin-dashboard-priorities {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.admin-dashboard-priorities h4 { color: var(--ink) !important; }

/* Dashboard source/export cards */
.dashboard-source-grid > div,
.dashboard-export-card {
  background: var(--card) !important;
  border-color: var(--line) !important;
}

/* Admin section title — tom dourado padrão do app */
.admin-section-title { color: #f2d089 !important; }
.admin-section-title::before { background: linear-gradient(180deg, #f2d089, #d4a017) !important; }
.admin-section-title::after { background: linear-gradient(90deg, rgba(242,208,137,.5), transparent) !important; }

/* Admin operations KPIs */
.admin-operations-kpis > div {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.admin-operations-kpis strong { color: var(--ink) !important; }
.admin-operations-kpis span { color: var(--muted) !important; }

/* Dashboard warnings */
.admin-dashboard-priority.warning {
  border-color: #d4820a !important;
  background: linear-gradient(135deg, #2a1800 0%, var(--card) 100%) !important;
}
.admin-dashboard-priority.danger {
  border-color: #c0392b !important;
  background: linear-gradient(135deg, #2a0800 0%, var(--card) 100%) !important;
}
.admin-dashboard-priority.ok {
  border-color: #27ae60 !important;
  background: linear-gradient(135deg, #0d3d26 0%, var(--card) 100%) !important;
}

/* Simplificar: esconder debug strip no modo normal */
.admin-debug-strip {
  font-size: 10px;
  opacity: 0.6;
  padding: 6px 12px !important;
}

/* ── LOGIN CORPORATIVO ── */
#login-screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #07152f;
}
body[data-theme="dark"] #login-screen {
  background: linear-gradient(180deg, #040b18 0%, #07152f 60%);
}
body[data-theme="light"] #login-screen {
  background: #f6f8fc;
}
.login-card {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}
.login-brand {
  background: linear-gradient(180deg, #040b18 0%, #07152f 100%);
  border-bottom: 1px solid #18305a;
  padding: 24px 20px 20px !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0 !important;
  overflow: visible !important;
}
body[data-theme="light"] .login-brand {
  background: linear-gradient(180deg, #1e3a7a 0%, #1e40af 100%);
  border-bottom-color: rgba(255,255,255,.15);
}
.login-logo-img {
  width: 110px !important;
  height: 110px !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 0 !important;
  margin-bottom: 0;
  display: block;
}
#login-screen h1 {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.5px;
  padding: 16px 20px 4px;
  text-align: center;
}
body[data-theme="dark"] #login-screen h1 { color: #ffffff; }
body[data-theme="light"] #login-screen h1 { color: #0f172a; }
#login-screen > .login-card > p {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 0 24px 14px;
  line-height: 1.5;
}
.public-routing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 14px 14px;
}
.public-routing-card {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 10px !important;
  text-align: left;
  cursor: pointer;
}
.public-routing-card span {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--pri, #2563eb);
  display: block;
  margin-bottom: 3px;
}
.public-routing-card strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}
.public-routing-card small {
  font-size: 9px;
  color: var(--muted);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 12px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-divider span {
  font-size: 9px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── LOGIN LOGO PLACEHOLDER ── */
.login-logo-placeholder {
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, #040b18 0%, #0c1e3a 100%);
  border: 1.5px solid #d4820a;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(212,130,10,.25), 0 8px 24px rgba(0,0,0,.5);
}


/* ══════════════════════════════════════════
   FIX: Admin dashboard tiles — dark mode
   ══════════════════════════════════════════ */
.dashboard-tile {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
.dashboard-tile strong { color: var(--ink) !important; }
.dashboard-tile span   { color: var(--primary) !important; }
.dashboard-tile small  { color: var(--muted) !important; }

/* ══════════════════════════════════════════
   FIX: Descobrir — botão Conectar no lugar certo
   ══════════════════════════════════════════ */
.descobrir-card .company-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 0 !important;
}
.descobrir-card .company-text {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
.descobrir-card .company-text h3 {
  font-size: 14px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.descobrir-card .company-text p {
  font-size: 11px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.descobrir-card .btn,
.descobrir-card .btn-primary,
.descobrir-card .descobrir-conectar {
  width: auto !important;
  min-height: unset !important;
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  margin-top: 0 !important;
  flex-shrink: 0 !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}

/* ══════════════════════════════════════════
   FEED — Carrossel de Notícias
   ══════════════════════════════════════════ */
.feed-carousel-wrap {
  position: relative;
  margin: 0 12px 12px;
  border-radius: 16px;
  overflow: hidden;
}
.feed-carousel-track {
  display: flex;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.feed-carousel-slide {
  flex: 0 0 100%;
  min-height: 130px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  position: relative;
}
.feed-carousel-slide::before {
  content:'';
  position:absolute;inset:0;
  background: linear-gradient(180deg, rgba(7,21,47,0) 30%, rgba(7,21,47,.85) 100%);
  z-index:1;
}
.feed-carousel-content { position:relative; z-index:2; }
.feed-carousel-cat {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; padding: 2px 8px; border-radius: 4px;
  display: inline-block; margin-bottom: 6px;
}
.feed-carousel-title {
  font-size: 14px; font-weight: 800; color: #fff; line-height: 1.35;
}
.feed-carousel-dots {
  display: flex; justify-content: center; gap: 5px;
  margin-top: 8px; position: absolute; bottom: 10px; width: 100%; z-index: 3;
}
.feed-carousel-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.35); transition: .2s;
}
.feed-carousel-dots span.on {
  background: #fff; width: 14px; border-radius: 3px;
}

/* Noticias grid */
.noticias-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px 12px;
}
.noticias-mini-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: opacity .15s;
}
.noticias-mini-card:active { opacity: .75; }
.noticias-mini-cat {
  font-size: 8px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .4px; display: block; margin-bottom: 4px;
}
.noticias-mini-title {
  font-size: 11px; font-weight: 700;
  color: var(--ink); line-height: 1.35;
}

/* Videos melhorado */
.feed-videos-row {
  display: flex; gap: 10px;
  padding: 0 12px 14px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.feed-videos-row::-webkit-scrollbar { display: none; }
.feed-video-card {
  flex: 0 0 130px; scroll-snap-align: start;
  cursor: pointer;
}
.feed-video-thumb {
  width: 130px; height: 80px; border-radius: 12px;
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.feed-video-play {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.feed-video-play svg { width: 13px; height: 13px; color: #fff; margin-left: 2px; }
.feed-video-badge {
  position: absolute; bottom: 6px; left: 6px;
  font-size: 8px; font-weight: 800; padding: 2px 6px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .3px;
}
.feed-video-title {
  font-size: 11px; color: var(--muted); line-height: 1.35; font-weight: 600;
}

/* Stories */
.feed-stories-wrap {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.feed-stories-row {
  display: flex; gap: 12px;
  padding: 0 12px;
  overflow-x: auto; scrollbar-width: none;
}
.feed-stories-row::-webkit-scrollbar { display: none; }
.story-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  flex-shrink: 0; cursor: pointer;
}
.story-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  position: relative;
}
.story-ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #2563eb; }
.story-label {
  font-size: 9px; color: var(--muted); font-weight: 600;
  max-width: 56px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* ══════════════════════════════════════════════════════════
   DARK MODE — OVERRIDE GLOBAL DE CORES HARDCODED
   Corrige todos os fundos brancos/claros em dark mode
   ══════════════════════════════════════════════════════════ */

/* Perfil */
body[data-theme="dark"] .profile-card,
body[data-theme="dark"] .info-tile,
body[data-theme="dark"] .profile-grid .info-tile {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
body[data-theme="dark"] .profile-card strong,
body[data-theme="dark"] .info-tile strong,
body[data-theme="dark"] .info-tile p {
  color: var(--ink) !important;
}
body[data-theme="dark"] .profile-card span,
body[data-theme="dark"] .info-tile span {
  color: var(--muted) !important;
}

/* Hero de perfil */
body[data-theme="dark"] .profile-hero,
body[data-theme="dark"] #profileHero {
  background: linear-gradient(160deg, #1d4ed8 0%, #0c1e3a 100%) !important;
}

/* Admin — todos os cards/tiles */
body[data-theme="dark"] .admin-dashboard-priority,
body[data-theme="dark"] .dashboard-tile,
body[data-theme="dark"] .admin-support-card,
body[data-theme="dark"] .admin-section-card,
body[data-theme="dark"] .admin-card {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .admin-dashboard-priority span,
body[data-theme="dark"] .admin-dashboard-priority strong,
body[data-theme="dark"] .admin-dashboard-priority p,
body[data-theme="dark"] .admin-support-card strong,
body[data-theme="dark"] .admin-support-card p,
body[data-theme="dark"] .admin-support-card small {
  color: var(--ink) !important;
}
body[data-theme="dark"] .admin-sync-bar.online {
  background: linear-gradient(135deg, #0d3d26 0%, var(--card) 100%) !important;
  border-color: #27ae60 !important;
}
body[data-theme="dark"] .admin-sync-bar:not(.online) {
  background: linear-gradient(135deg, #3d0d0d 0%, var(--card) 100%) !important;
  border-color: #dc2626 !important;
}
body[data-theme="dark"] .admin-dashboard-priority.warning {
  background: linear-gradient(135deg, #2a1800 0%, var(--card) 100%) !important;
  border-color: #d4820a !important;
}

/* Inputs e campos em dark mode */
body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select,
body[data-theme="dark"] .field-helper,
body[data-theme="dark"] .connection-tab {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

/* Auth tabs */
body[data-theme="dark"] .auth-tabs {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .auth-tabs button {
  color: var(--muted) !important;
  background: transparent !important;
}
body[data-theme="dark"] .auth-tabs button.active {
  background: var(--primary) !important;
  color: #fff !important;
}

/* Cards gerais com bg branco */
body[data-theme="dark"] .card,
body[data-theme="dark"] .modal-card,
body[data-theme="dark"] .section-card {
  background: var(--card) !important;
  border-color: var(--line) !important;
}

/* Badges em dark */
body[data-theme="dark"] .badge.assoc  { background: rgba(37,99,235,.15) !important; color: #93c5fd !important; }
body[data-theme="dark"] .badge.warn   { background: rgba(212,130,10,.15) !important; color: #fbbf24 !important; }
body[data-theme="dark"] .badge.info   { background: rgba(37,99,235,.15) !important; color: #93c5fd !important; }
body[data-theme="dark"] .badge.locked { background: rgba(212,130,10,.12) !important; color: #d4820a !important; }


/* ══════════════════════════════════════════
   FEED — Tamanhos corporativos
   ══════════════════════════════════════════ */

/* Stories maiores */
.story-avatar {
  width: 62px !important;
  height: 62px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}
.story-label {
  font-size: 10px !important;
  font-weight: 700 !important;
}

/* Videos maiores */
.feed-video-card { flex: 0 0 155px !important; }
.feed-video-thumb {
  width: 155px !important;
  height: 96px !important;
  border-radius: 14px !important;
}
.feed-video-title {
  font-size: 12px !important;
  color: var(--ink) !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}
.feed-video-badge {
  font-size: 9px !important;
  padding: 3px 8px !important;
  border-radius: 5px !important;
}

/* Notícias mini-cards maiores e corporativos */
.noticias-mini-card {
  padding: 14px 12px !important;
  border-radius: 14px !important;
  border: 1px solid var(--line) !important;
}
.noticias-mini-cat {
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .6px !important;
  margin-bottom: 6px !important;
  display: block !important;
}
.noticias-mini-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
  line-height: 1.4 !important;
}

/* Carrossel — slide maior */
.feed-carousel-slide {
  min-height: 160px !important;
  padding: 20px 18px 16px !important;
}
.feed-carousel-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
}
.feed-carousel-cat {
  font-size: 10px !important;
  padding: 3px 10px !important;
  border-radius: 5px !important;
  font-weight: 900 !important;
  letter-spacing: .5px !important;
  margin-bottom: 8px !important;
}
.feed-carousel-dots span {
  width: 6px !important;
  height: 6px !important;
}
.feed-carousel-dots span.on {
  width: 18px !important;
}

/* Feed section header */
.feed-section-header,
.feed-section > div:first-child {
  padding: 16px 14px 10px !important;
}


/* ════════════════════════════════════════════════════════════════
   CORREÇÃO GLOBAL DE CORES — v14
   Dark mode: fundos, textos, bordas em todas as abas
   Light mode: contraste e legibilidade
   ════════════════════════════════════════════════════════════════ */

/* ── Variáveis light mode explícitas ── */
body:not([data-theme="dark"]) {
  --bg: #f0f4f8;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #1e40af;
  --success: #15803d;
  --warn: #b45309;
}

/* ── Nav bar ── */
body[data-theme="dark"] .nav-bar,
body[data-theme="dark"] .bottom-nav,
body[data-theme="dark"] [role="tablist"] {
  background: #040b18 !important;
  border-top: 1px solid #18305a !important;
}
body[data-theme="dark"] .nav-btn,
body[data-theme="dark"] [role="tab"] {
  color: #3a5570 !important;
}
body[data-theme="dark"] .nav-btn.active,
body[data-theme="dark"] [role="tab"][aria-selected="true"] {
  color: #2563eb !important;
}

/* ── CONEXÕES ── */
body[data-theme="dark"] .conn-header,
body[data-theme="dark"] .conn-sub-tabs,
body[data-theme="dark"] .conn-tabs {
  background: var(--bg) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .conn-tab-btn,
body[data-theme="dark"] .conn-sub-btn {
  color: var(--muted) !important;
  background: transparent !important;
}
body[data-theme="dark"] .conn-tab-btn.active,
body[data-theme="dark"] .conn-sub-btn.active,
body[data-theme="dark"] [data-conn-tab].active {
  color: #2563eb !important;
  border-bottom-color: #2563eb !important;
}
/* Conversas lista */
body[data-theme="dark"] .conv-item,
body[data-theme="dark"] .conversation-item {
  background: transparent !important;
  border-bottom: 1px solid var(--line) !important;
}
body[data-theme="dark"] .conv-item:hover,
body[data-theme="dark"] .conversation-item:hover {
  background: rgba(255,255,255,.03) !important;
}
body[data-theme="dark"] .conv-name,
body[data-theme="dark"] .conversation-name { color: var(--ink) !important; }
body[data-theme="dark"] .conv-preview,
body[data-theme="dark"] .conversation-preview { color: var(--muted) !important; }
/* Descobrir */
body[data-theme="dark"] .card.descobrir-card {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .descobrir-card h3 { color: var(--ink) !important; }
body[data-theme="dark"] .descobrir-card p  { color: var(--muted) !important; }
/* Convites */
body[data-theme="dark"] .invite-card,
body[data-theme="dark"] .convite-card {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .invite-card strong,
body[data-theme="dark"] .convite-card strong { color: var(--ink) !important; }
body[data-theme="dark"] .invite-card small,
body[data-theme="dark"] .convite-card small { color: var(--muted) !important; }

/* ── PERFIL ── */
body[data-theme="dark"] #tab-perfil ~ .tab-panel,
body[data-theme="dark"] [data-panel="perfil"] {
  background: var(--bg) !important;
}
body[data-theme="dark"] .profile-hero {
  background: linear-gradient(160deg,#1d4ed8 0%,#0c1e3a 100%) !important;
}
body[data-theme="dark"] .profile-name { color: #ffffff !important; }
body[data-theme="dark"] .profile-subtitle { color: rgba(255,255,255,.7) !important; }
body[data-theme="dark"] .profile-badge { background: rgba(255,255,255,.15) !important; color: #fff !important; }
body[data-theme="dark"] .profile-menu-item,
body[data-theme="dark"] .profile-row,
body[data-theme="dark"] .perfil-row {
  background: transparent !important;
  border-bottom: 1px solid var(--line) !important;
  color: var(--ink) !important;
}
body[data-theme="dark"] .profile-menu-item:hover { background: rgba(255,255,255,.03) !important; }
body[data-theme="dark"] .profile-menu-label,
body[data-theme="dark"] .profile-row-label { color: var(--ink) !important; }
body[data-theme="dark"] .profile-menu-sub,
body[data-theme="dark"] .profile-row-sub { color: var(--muted) !important; }
body[data-theme="dark"] .profile-menu-arrow,
body[data-theme="dark"] .perfil-arrow { color: var(--muted) !important; }
body[data-theme="dark"] .info-tile,
body[data-theme="dark"] .profile-tile {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .info-tile strong,
body[data-theme="dark"] .profile-tile strong { color: var(--ink) !important; }
body[data-theme="dark"] .info-tile p,
body[data-theme="dark"] .info-tile span,
body[data-theme="dark"] .profile-tile span { color: var(--muted) !important; }

/* ── ADMIN ── */
body[data-theme="dark"] [data-panel="admin"],
body[data-theme="dark"] #adminPanel {
  background: var(--bg) !important;
}
body[data-theme="dark"] .admin-hero,
body[data-theme="dark"] .admin-header-bar {
  background: linear-gradient(135deg,#1d4ed8 0%,#0c1e3a 100%) !important;
}
body[data-theme="dark"] .admin-hero *,
body[data-theme="dark"] .admin-header-bar * { color: #fff !important; }
body[data-theme="dark"] .dashboard-tile,
body[data-theme="dark"] .admin-tile,
body[data-theme="dark"] .admin-dashboard-priority,
body[data-theme="dark"] .admin-support-card,
body[data-theme="dark"] .admin-section-card {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .dashboard-tile strong,
body[data-theme="dark"] .admin-tile strong { color: var(--ink) !important; font-size: 24px !important; }
body[data-theme="dark"] .dashboard-tile span,
body[data-theme="dark"] .admin-tile .tile-label { color: #2563eb !important; font-size: 10px !important; font-weight: 800 !important; }
body[data-theme="dark"] .dashboard-tile small,
body[data-theme="dark"] .admin-tile small { color: var(--muted) !important; }
body[data-theme="dark"] .admin-dashboard-priority strong { color: var(--ink) !important; }
body[data-theme="dark"] .admin-dashboard-priority span  { color: var(--muted) !important; }
body[data-theme="dark"] .admin-support-card strong { color: var(--ink) !important; }
body[data-theme="dark"] .admin-support-card p,
body[data-theme="dark"] .admin-support-card small { color: var(--muted) !important; }
body[data-theme="dark"] .admin-sync-bar.online {
  background: linear-gradient(135deg,#0d3d26,var(--card)) !important;
  border-color: #27ae60 !important;
  color: #27ae60 !important;
}
body[data-theme="dark"] .admin-sync-bar.online * { color: #27ae60 !important; }
body[data-theme="dark"] .admin-sync-bar:not(.online) {
  background: linear-gradient(135deg,#3d0d0d,var(--card)) !important;
  border-color: #dc2626 !important;
}
/* Quick chips admin */
body[data-theme="dark"] .admin-quick-chip,
body[data-theme="dark"] .admin-chip {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

/* ── CRM ── */
body[data-theme="dark"] [data-panel="crm"],
body[data-theme="dark"] #crmPanel { background: var(--bg) !important; }
body[data-theme="dark"] .crm-card,
body[data-theme="dark"] .lead-card,
body[data-theme="dark"] .crm-item {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .crm-card h3,
body[data-theme="dark"] .lead-card strong,
body[data-theme="dark"] .crm-item strong { color: var(--ink) !important; }
body[data-theme="dark"] .crm-card p,
body[data-theme="dark"] .lead-card small,
body[data-theme="dark"] .crm-item small { color: var(--muted) !important; }
body[data-theme="dark"] .crm-funnel,
body[data-theme="dark"] .funil-bar {
  background: var(--card) !important;
  border-color: var(--line) !important;
}
body[data-theme="dark"] .crm-stage-label { color: var(--muted) !important; }
body[data-theme="dark"] .crm-stage-count { color: var(--ink) !important; }
body[data-theme="dark"] .crm-next { color: var(--muted) !important; }
body[data-theme="dark"] .crm-next strong { color: var(--ink) !important; }

/* ── LIGHT MODE — Contraste e legibilidade ── */
body:not([data-theme="dark"]) .card,
body:not([data-theme="dark"]) .descobrir-card,
body:not([data-theme="dark"]) .crm-card,
body:not([data-theme="dark"]) .lead-card,
body:not([data-theme="dark"]) .info-tile,
body:not([data-theme="dark"]) .dashboard-tile,
body:not([data-theme="dark"]) .admin-dashboard-priority,
body:not([data-theme="dark"]) .invite-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
body:not([data-theme="dark"]) .card h3,
body:not([data-theme="dark"]) .card strong,
body:not([data-theme="dark"]) .crm-card h3,
body:not([data-theme="dark"]) .lead-card strong { color: #0f172a !important; }
body:not([data-theme="dark"]) .card p,
body:not([data-theme="dark"]) .card small,
body:not([data-theme="dark"]) .crm-card p { color: #64748b !important; }
body:not([data-theme="dark"]) .nav-bar,
body:not([data-theme="dark"]) .bottom-nav,
body:not([data-theme="dark"]) [role="tablist"] {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
}

/* ── Feed header dinâmico ── */
.feed-dyn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 14px 10px;
}

/* ═══════════════════════════════════════════════════
   LIGHT MODE — CORREÇÕES GERAIS v14-lm
   ═══════════════════════════════════════════════════ */

/* Admin sync bar light mode — retoma cores semânticas */
body:not([data-theme="dark"]) .admin-sync-bar.online {
  background: #ecfdf5 !important;
  border-color: #16a34a !important;
}
body:not([data-theme="dark"]) .admin-sync-bar.online strong { color: #166534 !important; }
body:not([data-theme="dark"]) .admin-sync-bar.online span  { color: #15803d !important; }
body:not([data-theme="dark"]) .admin-sync-bar.online button {
  background: #fff !important; border-color: #16a34a !important; color: #15803d !important;
}
body:not([data-theme="dark"]) .admin-sync-bar:not(.online) {
  background: #fef2f2 !important; border-color: #f87171 !important;
}
body:not([data-theme="dark"]) .admin-sync-bar:not(.online) strong { color: #991b1b !important; }
body:not([data-theme="dark"]) .admin-sync-bar:not(.online) span  { color: #b91c1c !important; }

/* Admin tiles light mode */
body:not([data-theme="dark"]) .dashboard-tile,
body:not([data-theme="dark"]) .admin-tile,
body:not([data-theme="dark"]) .admin-section-card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
  color: #0f172a !important;
}
body:not([data-theme="dark"]) .dashboard-tile strong,
body:not([data-theme="dark"]) .admin-tile strong { color: #0f172a !important; font-size: 24px !important; }
body:not([data-theme="dark"]) .dashboard-tile span,
body:not([data-theme="dark"]) .admin-tile .tile-label { color: #1e40af !important; font-size: 10px !important; font-weight: 800 !important; }
body:not([data-theme="dark"]) .dashboard-tile small,
body:not([data-theme="dark"]) .admin-tile small { color: #64748b !important; }
body:not([data-theme="dark"]) .admin-quick-chip,
body:not([data-theme="dark"]) .admin-chip {
  background: #f1f5f9 !important; border-color: #e2e8f0 !important; color: #0f172a !important;
}
body:not([data-theme="dark"]) .admin-support-card {
  background: #ffffff !important; border-color: #e5e7eb !important;
}
body:not([data-theme="dark"]) .admin-support-card strong { color: #0f172a !important; }
body:not([data-theme="dark"]) .admin-support-card p,
body:not([data-theme="dark"]) .admin-support-card span,
body:not([data-theme="dark"]) .admin-support-card small { color: #64748b !important; }
body:not([data-theme="dark"]) .admin-debug-strip {
  background: #f8fafc !important; border-color: #e2e8f0 !important;
}
body:not([data-theme="dark"]) .admin-debug-strip span { color: #64748b !important; }
body:not([data-theme="dark"]) .admin-mobile-nav-toggle {
  background: #ffffff !important; border-color: #e5e7eb !important; color: #0f172a !important;
}
body:not([data-theme="dark"]) .admin-dashboard-priority {
  background: #ffffff !important; border-color: #e5e7eb !important;
}
body:not([data-theme="dark"]) .admin-dashboard-priority strong { color: #0f172a !important; }
body:not([data-theme="dark"]) .admin-dashboard-priority span  { color: #64748b !important; }

/* Perfil light mode */
body:not([data-theme="dark"]) .profile-menu-item,
body:not([data-theme="dark"]) .profile-row,
body:not([data-theme="dark"]) .perfil-row {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #0f172a !important;
}
body:not([data-theme="dark"]) .profile-menu-label,
body:not([data-theme="dark"]) .profile-row-label { color: #0f172a !important; }
body:not([data-theme="dark"]) .profile-menu-sub,
body:not([data-theme="dark"]) .profile-row-sub  { color: #64748b !important; }
body:not([data-theme="dark"]) .profile-menu-arrow,
body:not([data-theme="dark"]) .perfil-arrow { color: #cbd5e1 !important; }
body:not([data-theme="dark"]) .info-tile,
body:not([data-theme="dark"]) .profile-tile {
  background: #ffffff !important; border-color: #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.05) !important;
}
body:not([data-theme="dark"]) .info-tile strong,
body:not([data-theme="dark"]) .profile-tile strong { color: #0f172a !important; }
body:not([data-theme="dark"]) .info-tile span,
body:not([data-theme="dark"]) .profile-tile span  { color: #64748b !important; }

/* Conexões light mode — conversas */
body:not([data-theme="dark"]) .conversation-item {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
body:not([data-theme="dark"]) .conversation-item strong { color: #0f172a !important; }
body:not([data-theme="dark"]) .conversation-item em     { color: #64748b !important; }
body:not([data-theme="dark"]) .conversation-item b      { color: #64748b !important; }

/* Conexões subtabs light mode */
body:not([data-theme="dark"]) .conn-subtabs {
  background: #ffffff !important; border-color: #e5e7eb !important;
}
body:not([data-theme="dark"]) .conn-subtab { color: #94a3b8 !important; background: transparent !important; }
body:not([data-theme="dark"]) .conn-subtab.active {
  color: #1e40af !important; border-bottom-color: #1e40af !important;
}

/* Descobrir cards light mode */
body:not([data-theme="dark"]) .card.descobrir-card {
  background: #ffffff !important; border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
}
body:not([data-theme="dark"]) .descobrir-card h3 { color: #0f172a !important; }
body:not([data-theme="dark"]) .descobrir-card p  { color: #64748b !important; }

/* Nível badge light mode */
body:not([data-theme="dark"]) .nivel-badge,
body:not([data-theme="dark"]) .nivel-bar {
  background: #fff7ed !important; border-color: #f59e0b !important; color: #b45309 !important;
}

/* ═══════════════════════════════════════════════════
   MODAL LGPD
   ═══════════════════════════════════════════════════ */
#lgpdOverlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4,11,24,.92);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px);
}
#lgpdOverlay[hidden] { display: none !important; }
.lgpd-sheet {
  width: 100%; max-width: 480px; max-height: 92vh;
  background: #07152f; border-radius: 24px 24px 0 0;
  border-top: 1px solid #18305a;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,.5);
}
body:not([data-theme="dark"]) .lgpd-sheet { background: #ffffff; border-top-color: #e5e7eb; }
.lgpd-sheet-handle {
  width: 36px; height: 4px; border-radius: 2px; background: #18305a;
  margin: 12px auto 0;
}
body:not([data-theme="dark"]) .lgpd-sheet-handle { background: #e5e7eb; }
.lgpd-header {
  padding: 16px 20px 12px; text-align: center; flex-shrink: 0;
}
.lgpd-logo {
  width: 48px; height: 48px; border-radius: 12px; object-fit: contain; margin-bottom: 10px;
}
.lgpd-header h2 { font-size: 17px; font-weight: 900; margin-bottom: 4px; }
.lgpd-header p  { font-size: 11px; }
.lgpd-header h2, .lgpd-header p { color: #dde6f0; }
body:not([data-theme="dark"]) .lgpd-header h2 { color: #0f172a; }
body:not([data-theme="dark"]) .lgpd-header p  { color: #64748b; }
.lgpd-body {
  flex: 1; overflow-y: auto; padding: 0 20px 16px; scrollbar-width: none;
}
.lgpd-body::-webkit-scrollbar { display: none; }
.lgpd-section { margin-bottom: 16px; }
.lgpd-section h3 {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 6px; color: #2563eb;
}
.lgpd-section p  { font-size: 12px; line-height: 1.65; }
.lgpd-section p, .lgpd-section li { color: #6b8aad; }
body:not([data-theme="dark"]) .lgpd-section p,
body:not([data-theme="dark"]) .lgpd-section li  { color: #475569; }
body:not([data-theme="dark"]) .lgpd-section h3  { color: #1e40af; }
.lgpd-section ul { padding-left: 16px; }
.lgpd-section li { font-size: 12px; line-height: 1.65; margin-bottom: 3px; }
.lgpd-divider { height: 1px; background: #18305a; margin: 10px 0; }
body:not([data-theme="dark"]) .lgpd-divider { background: #e5e7eb; }
.lgpd-scroll-hint {
  text-align: center; font-size: 10px; font-weight: 700;
  padding: 8px 20px; color: #3a5570; letter-spacing: .4px;
  flex-shrink: 0;
}
body:not([data-theme="dark"]) .lgpd-scroll-hint { color: #94a3b8; }
.lgpd-footer {
  padding: 12px 20px 24px; flex-shrink: 0;
  border-top: 1px solid #18305a;
}
body:not([data-theme="dark"]) .lgpd-footer { border-top-color: #e5e7eb; }
.lgpd-check-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.lgpd-check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #2563eb; flex-shrink: 0; }
.lgpd-check-row label { font-size: 12px; line-height: 1.5; }
.lgpd-check-row label, .lgpd-check-row a { color: #6b8aad; }
body:not([data-theme="dark"]) .lgpd-check-row label,
body:not([data-theme="dark"]) .lgpd-check-row a  { color: #475569; }
.lgpd-check-row a { color: #2563eb !important; text-decoration: underline; }
#lgpdAcceptBtn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: #2563eb; color: #fff; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: opacity .2s;
}
#lgpdAcceptBtn:disabled { opacity: .35; cursor: not-allowed; }
#lgpdAcceptBtn:not(:disabled):hover { background: #1d4ed8; }
.lgpd-version {
  text
/* ── Ferramenta Consulta CNPJ (Receita) no painel Gestão & Selos ─────────── */
.cnpj-tool { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:space-between;
  background:#f3f8ff; border:1px solid #cfe0f5; border-radius:12px; padding:12px 14px; margin:10px 0 14px; }
.cnpj-tool strong { display:block; font-size:14px; color:#123; }
.cnpj-tool small { display:block; color:#4a5a6a; font-size:12px; margin-top:2px; max-width:640px; }
.gestao-consulta-btn { background:#0a66c2; color:#fff; border:none; border-radius:8px; padding:8px 12px;
  font-size:13px; cursor:pointer; }
.gestao-consulta-btn.big { padding:10px 16px; font-weight:600; white-space:nowrap; }
.gestao-consulta-btn:hover { filter:brightness(1.05); }
.gestao-receita { margin:6px 0 2px; font-size:12.5px; padding:5px 8px; border-radius:7px; }
.gestao-receita.ok { background:#e8f6ec; color:#1c7a3a; border:1px solid #bfe6cb; }
.gestao-receita.warn { background:#fdf1e5; color:#9a5a12; border:1px solid #f2d3ad; }
.gestao-obs-wrap { display:flex; align-items:center; gap:6px; margin:4px 0 2px; }
.gestao-obs-wrap label { font-size:12px; color:#5a6a78; }
.gestao-obs { flex:1; min-width:0; border:1px solid #d3dce6; border-radius:7px; padding:6px 8px; font-size:13px; }
.gestao-wa-btn { background:#25d366; color:#0b2e17; border:none; border-radius:8px; padding:8px 12px;
  font-size:13px; font-weight:600; cursor:pointer; }
.gestao-wa-btn:hover { filter:brightness(1.05); }

/* ── Override tema escuro + especificidade p/ ferramenta CNPJ (v123) ─────── */
.admin-operations-panel .cnpj-tool { display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  justify-content:space-between; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.12);
  border-radius:12px; padding:14px; margin:10px 0 16px; }
.admin-operations-panel .cnpj-tool > div { flex:1; min-width:220px; }
.admin-operations-panel .cnpj-tool strong { display:block; font-size:14px; color:#eaf2ff; margin-bottom:6px; }
.admin-operations-panel .cnpj-tool small { display:block; color:#9fb2c6; font-size:12px; line-height:1.45; }
.gestao-actions .gestao-consulta-btn, .cnpj-tool .gestao-consulta-btn {
  background:#0a66c2 !important; color:#fff !important; border:1px solid #0a66c2 !important; }
.gestao-actions .gestao-wa-btn {
  background:#25d366 !important; color:#0b2e17 !important; border:1px solid #25d366 !important; font-weight:600; }
.gestao-card .gestao-receita.ok { background:rgba(46,160,90,.16) !important; color:#8fe6b0 !important; border:1px solid rgba(46,160,90,.35) !important; }
.gestao-card .gestao-receita.warn { background:rgba(210,140,30,.16) !important; color:#f2c98a !important; border:1px solid rgba(210,140,30,.4) !important; }
.gestao-card .gestao-obs-wrap label { color:#9fb2c6 !important; }
.gestao-card .gestao-obs { background:rgba(255,255,255,.06) !important; color:#eaf2ff !important; border:1px solid rgba(255,255,255,.18) !important; }

/* ── Card dos Selos: layout painel de controle (v124) ───────────────────── */
.gestao-card { display:flex; flex-direction:column; gap:0; padding:0; overflow:hidden; }
.gestao-card .gestao-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
  padding:14px 14px 10px; flex-wrap:wrap; }
.gestao-card .gestao-headline { min-width:0; }
.gestao-card .gestao-name { font-size:16px; font-weight:700; color:#eaf2ff; }
.gestao-card .gestao-sub { font-size:12px; color:#9fb2c6; margin-top:2px; }
.gestao-card .gestao-badges { display:flex; gap:6px; flex-wrap:wrap; }
.gestao-block { border-top:1px solid rgba(255,255,255,.08); padding:12px 14px; }
.gestao-block-title { font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:#7f93a8; margin-bottom:8px; }
.gestao-fields { display:flex; flex-direction:column; gap:5px; margin-bottom:8px; }
.gestao-field { font-size:13px; color:#d6e2f0; }
.gestao-field b { display:inline-block; min-width:96px; color:#8aa0b6; font-weight:600; margin-right:6px; }
.gestao-field.muted { color:#7f93a8; }
.gestao-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.gestao-receita.none { background:rgba(255,255,255,.05); color:#9fb2c6; border:1px dashed rgba(255,255,255,.15); }

/* ── Fix (v127): forcar layout dos dados/titulos dos Selos (vencer overrides) ── */
.gestao-card .gestao-block-title { font-size:11px !important; letter-spacing:.06em; text-transform:uppercase !important; color:#7f93a8 !important; margin-bottom:8px !important; font-weight:600 !important; }
.gestao-card .gestao-fields { display:flex !important; flex-direction:column !important; gap:6px !important; margin-bottom:8px !important; }
.gestao-card .gestao-field { display:block !important; font-size:13px !important; color:#d6e2f0 !important; }
.gestao-card .gestao-field b { display:inline-block !important; min-width:92px !important; color:#8aa0b6 !important; font-weight:600 !important; margin-right:8px !important; }

/* ── Botao "Melhorar com IA" no resumo do chat (v129) ───────────────────── */
.lia-sum-btn-ai { background:#6d28d9 !important; color:#fff !important; border:1px solid #6d28d9 !important; font-weight:600; }
.lia-sum-btn-ai:hover { filter:brightness(1.08); }
.lia-sum-btn-ai:disabled { opacity:.7; cursor:default; }

/* ── Refino visual leve do card dos Selos (v129) ────────────────────────── */
.gestao-card { background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.10) !important; border-radius:14px !important; box-shadow:0 1px 0 rgba(255,255,255,.03) inset; }
.gestao-card .gestao-head { background:rgba(255,255,255,.03); padding-bottom:12px; }
.gestao-card .gestao-block + .gestao-block { border-top:1px solid rgba(255,255,255,.07); }

/* ── Lia no chat: botao na barra + menu suspenso (v131) ─────────────────── */
.lia-input-btn { flex:0 0 auto; width:40px; height:40px; border-radius:50%; border:none; cursor:pointer;
  background:linear-gradient(135deg,#7c3aed,#4f46e5); color:#fff; font-size:18px; line-height:1;
  display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(79,70,229,.4); }
.lia-input-btn:hover { filter:brightness(1.1); }
.lia-input-btn:active { transform:scale(.94); }

.chat-assist.lia-menu { position:relative; background:#0f1b30; border:1px solid rgba(124,58,237,.35);
  border-radius:14px; padding:12px; margin:0 8px 8px; box-shadow:0 -6px 24px rgba(0,0,0,.35);
  animation:liaMenuIn .16s ease-out; }
@keyframes liaMenuIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.lia-menu .lia-menu-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.lia-menu .lia-menu-head strong { font-size:14px; color:#c7bcff; }
.lia-menu .lia-menu-head span { font-size:11px; color:#8aa0b6; }
.lia-menu .lia-menu-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.lia-menu .lia-menu-actions button { width:100%; text-align:left; background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12); color:#eaf2ff; border-radius:10px; padding:10px 12px;
  font-size:13px; cursor:pointer; }
.lia-menu .lia-menu-actions button:hover { background:rgba(124,58,237,.22); border-color:rgba(124,58,237,.5); }
.lia-menu .lia-menu-actions .assist-resumo { grid-column:1 / -1; background:rgba(124,58,237,.25); border-color:rgba(124,58,237,.5); font-weight:600; }
.lia-menu .chat-assist-summary { margin-top:10px; }

/* ── Produtos: abas (Benefício x Serviço) + selo no título (v132) ────────── */
.prod-tabs { display:flex; gap:8px; margin:4px 0 14px; }
.prod-tabs .prod-tab { flex:1; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.04);
  color:#cfe0f5; border-radius:10px; padding:9px 8px; font-size:13px; cursor:pointer; font-weight:500;
  display:flex; align-items:center; justify-content:center; gap:6px; }
.prod-tabs .prod-tab b { background:rgba(255,255,255,.12); border-radius:20px; padding:1px 8px; font-size:11px; font-weight:700; }
.prod-tabs .prod-tab.active { background:#0a66c2; border-color:#0a66c2; color:#fff; }
.prod-tabs .prod-tab.active b { background:rgba(255,255,255,.25); }
.prod-card .acc-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.prod-chip { flex:0 0 auto; font-size:10.5px; font-weight:700; letter-spacing:.02em; padding:3px 9px;
  border-radius:20px; white-space:nowrap; text-transform:uppercase; }
.prod-chip-inc { background:rgba(46,160,90,.18); color:#8fe6b0; border:1px solid rgba(46,160,90,.4); }
.prod-chip-serv { background:rgba(210,140,30,.16); color:#f2c98a; border:1px solid rgba(210,140,30,.42); }

/* ── Fix barra do chat: 4 colunas (input · Lia · clipe · Enviar) + limpeza (v133) ── */
.chat-input { grid-template-columns: minmax(0,1fr) 48px 48px 84px !important; }
.lia-input-btn { width:100% !important; border-radius:14px !important;
  background:linear-gradient(135deg,#7c3aed,#4f46e5) !important; color:#fff !important; box-shadow:none !important; }
.chat-assist[hidden] { display:none !important; }
.chat-search { display:none !important; }
.lia-menu .lia-menu-actions { grid-template-columns:1fr; }
.lia-menu .lia-menu-actions .assist-resumo { grid-column:auto; }

/* ── Busca nos Produtos (v133) ──────────────────────────────────────────── */
.prod-search { width:100%; box-sizing:border-box; margin:2px 0 10px; padding:11px 14px;
  border:1px solid rgba(255,255,255,.16); border-radius:12px; background:rgba(255,255,255,.05);
  color:#eaf2ff; font-size:14px; }
.prod-search::placeholder { color:#8aa0b6; }
.prod-search:focus { outline:none; border-color:#7c3aed; background:rgba(124,58,237,.08); }

/* ── Aviso oficial da ACICG em destaque na Início ─────────────────────── */
.aviso-destaque { max-width: 480px; margin: 12px auto 4px; }
.aviso-card {
  position: relative;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 40px 14px 14px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(242,208,137,.16), rgba(20,42,78,.5));
  border: 1px solid rgba(242,208,137,.4);
  border-left: 4px solid #f2d089;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.aviso-card .aviso-ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: rgba(242,208,137,.2); border: 1px solid rgba(242,208,137,.4);
}
.aviso-card .aviso-body { flex: 1 1 auto; min-width: 0; }
.aviso-card .aviso-tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: #f2d089; margin-bottom: 3px;
}
.aviso-card .aviso-body strong { display: block; font-size: 15px; color: #fff; line-height: 1.25; }
.aviso-card .aviso-body p { margin: 4px 0 0; font-size: 13px; color: #d7e2f2; line-height: 1.4; }
.aviso-card .aviso-link {
  display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700;
  color: #f2d089; text-decoration: none;
}
.aviso-card .aviso-x {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255,255,255,.1); color: #cdd8ec; font-size: 13px; line-height: 1;
}
.aviso-card .aviso-x:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── Admin: publicar Avisos ────────────────────────────────────────────── */
.admin-aviso-form { display: grid; gap: 12px; margin: 14px 0 16px; }
.admin-aviso-form label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #cfe0f5; }
.admin-aviso-form label input, .admin-aviso-form label textarea {
  width: 100%; box-sizing: border-box;
  text-transform: none; letter-spacing: 0; font-weight: 600;
  font-family: inherit; font-size: 14px; padding: 12px 13px; border-radius: 11px;
  border: 1px solid rgba(147,197,253,.25); background: rgba(255,255,255,.06); color: #eaf2ff;
}
.admin-aviso-form label textarea { resize: vertical; min-height: 68px; }
.admin-aviso-form input::placeholder, .admin-aviso-form textarea::placeholder { color: #8aa0b6; }
.admin-aviso-form input:focus, .admin-aviso-form textarea:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(147,197,253,.2); }
.admin-aviso-btn {
  justify-self: start; border: none; cursor: pointer;
  background: linear-gradient(135deg, #d4a017, #b8860b); color: #1a1205;
  font-weight: 800; font-size: 14px; padding: 11px 20px; border-radius: 11px;
  box-shadow: 0 4px 14px rgba(212,160,23,.32);
}
.admin-aviso-btn:active { transform: scale(.97); }
.admin-aviso-fb { font-size: 12.5px; font-weight: 700; padding: 8px 11px; border-radius: 9px; }
.admin-aviso-fb.ok { background: rgba(37,211,102,.14); color: #7ee2a8; }
.admin-aviso-fb.err { background: rgba(239,68,68,.14); color: #f7a3a3; }
.admin-aviso-list { display: grid; gap: 9px; }
.admin-aviso-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-left: 3px solid #d4a017;
}
.admin-aviso-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-aviso-info strong { font-size: 14px; color: #fff; }
.admin-aviso-info span { font-size: 12.5px; color: #c3d5ea; }
.admin-aviso-info em { font-size: 11px; color: #90a3bd; font-style: normal; }
.admin-aviso-del {
  flex: 0 0 auto; cursor: pointer; border: 1px solid rgba(239,68,68,.4);
  background: rgba(239,68,68,.1); color: #f7a3a3; font-weight: 700; font-size: 12.5px;
  padding: 8px 13px; border-radius: 10px;
}
.admin-aviso-del:hover { background: rgba(239,68,68,.2); }


/* ── Dashboard Admin: cards principais (linguagem simples) + Tops ───────── */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 4px 0 12px; }
.dash-kpi { padding: 13px 14px; border-radius: 14px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); border-left: 3px solid #60a5fa; }
.dash-kpi b { display: flex; align-items: center; gap: 7px; font-size: 26px; font-weight: 800; line-height: 1; color: #eaf2ff; }
.dash-kpi span { display: block; font-size: 12px; font-weight: 700; color: #cfe0f5; margin-top: 6px; }
.dash-kpi small { display: block; font-size: 10.5px; color: #9db0c9; margin-top: 2px; }
.dash-kpi.kpi-emp { border-left-color: #3dd68c; }
.dash-kpi.kpi-user { border-left-color: #b48cf2; }
.dash-kpi.kpi-online { border-left-color: #22c55e; }
.dash-kpi.kpi-online b { color: #7ee2a8; }
.dash-kpi.kpi-pend { border-left-color: #94a3b8; }
.dash-kpi.kpi-pend.alerta { border-left-color: #f2b455; background: rgba(242,180,85,.08); }
.dash-kpi.kpi-pend.alerta b { color: #f7c877; }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: dashPulse 1.6s infinite; flex: 0 0 auto; }
@keyframes dashPulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.dash-tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.dash-top-card { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.dash-top-head { font-size: 13px; font-weight: 800; color: #f2d089; margin-bottom: 10px; }
.dash-top-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.dash-top-row:last-child { border-bottom: none; }
.dash-top-pos { flex: 0 0 auto; font-size: 16px; min-width: 22px; text-align: center; }
.dash-top-nome { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 700; color: #eaf2ff; display: flex; flex-direction: column; }
.dash-top-nome small { font-size: 10.5px; font-weight: 500; color: #9db0c9; }
.dash-top-num { flex: 0 0 auto; font-size: 15px; font-weight: 800; color: #cfe0f5; }
.dash-top-num i { font-size: 10px; font-weight: 600; font-style: normal; color: #9db0c9; }
.dash-top-empty { font-size: 12px; color: #9db0c9; padding: 6px 0; }

/* ── Admin no mobile: nunca deixar o conteúdo estourar a largura da tela ── */
.tab-panel[data-panel="admin"] { overflow-x: hidden; }
#adminPanel { max-width: 100%; overflow-x: hidden; }
.admin-report-hero { flex-wrap: wrap; }
.admin-report-hero > div { min-width: 0; flex: 1 1 55%; }
.admin-report-hero > b { flex: 0 0 auto; }
.admin-operations-panel > *,
.admin-dashboard > *,
.admin-list > *,
.admin-process,
.admin-row { min-width: 0; }
.admin-report-summary-grid, .admin-operations-kpis { max-width: 100%; }
.admin-panel-heading h3, .admin-report-hero strong { overflow-wrap: anywhere; }
