﻿/* Ativo Digital — camada visual institucional (texturas, glass, mesh) */

:root {
  --ad-inst-header-h: 72px;
}

@media (min-width: 860px) {
  :root {
    --ad-inst-header-h: 88px;
  }
}

@media (min-width: 1024px) {
  :root {
    --ad-inst-header-h: 96px;
  }
}

body.ad-has-inst-header {
  --chrome-top: calc(var(--ad-inst-header-h) + var(--safe-top, 0px));
}

/* Chat: header mais compacto para liberar área útil */
body.ad-chat-page {
  --ad-inst-header-h: 58px;
}

@media (min-width: 768px) {
  body.ad-chat-page {
    --ad-inst-header-h: 64px;
  }
}

body.ad-chat-page .ad-header-brand img {
  height: 48px;
}

@media (min-width: 768px) {
  body.ad-chat-page .ad-header-brand img {
    height: 54px;
  }
}

body.ad-chat-page .ad-header-inst {
  padding-top: calc(0.1rem + var(--safe-top, 0px));
  padding-bottom: 0.1rem;
  min-height: var(--ad-inst-header-h);
}

.ad-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 210;
  background: linear-gradient(90deg, var(--ad-orange-deep) 0%, var(--ad-orange-primary) 45%, var(--ad-yellow-support) 100%);
  box-shadow: 0 0 12px rgba(255, 90, 0, 0.45);
  pointer-events: none;
  transition: width 0.15s ease;
}

.ad-bg-dispersion {
  background-color: rgba(6, 10, 18, 0.86);
  background-image:
    var(--ad-noise),
    radial-gradient(ellipse 90% 60% at 8% -10%, rgba(37, 42, 97, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(255, 90, 0, 0.1), transparent 50%),
    url('../images/dispersion-glass.png');
  background-size: auto, auto, auto, cover;
  background-position: center, center, center, center;
  background-blend-mode: overlay, normal, normal, overlay;
  background-attachment: fixed;
}

.ad-bg-mesh {
  background-color: #0a0e14;
  background-image:
    var(--ad-noise),
    radial-gradient(ellipse 90% 60% at 8% -10%, rgba(37, 42, 97, 0.42), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(255, 90, 0, 0.14), transparent 50%),
    radial-gradient(ellipse 80% 55% at 50% 110%, rgba(17, 105, 103, 0.18), transparent 55%),
    linear-gradient(168deg, #080c12 0%, #101820 38%, #161618 100%);
  background-attachment: fixed;
}

.ad-glass {
  background: var(--ad-glass-bg);
  backdrop-filter: blur(var(--ad-glass-blur));
  -webkit-backdrop-filter: blur(var(--ad-glass-blur));
  border: 1px solid var(--ad-glass-border);
}

.ad-glass-light {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ad-accent-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 0, 0.55), transparent);
}

/* Header institucional — faixa branca glass (padrão landing V2) */
.ad-header-inst {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ad-inst-header-h);
  padding: 0.15rem 1rem;
  padding-top: calc(0.15rem + var(--safe-top, 0px));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.ad-header-brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

.ad-header-brand img {
  height: 64px;
  width: auto;
  display: block;
}


.ad-header-actions {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  margin-top: calc(var(--safe-top, 0px) / 2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ad-header-train {
  border: 1px solid rgba(255, 90, 0, 0.55);
  background: linear-gradient(135deg, rgba(255, 90, 0, 0.95), rgba(230, 57, 0, 0.92));
  color: #fff;
  font-family: var(--font-institucional);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill, 999px);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 90, 0, 0.28);
}

.ad-header-train:hover {
  filter: brightness(1.05);
}

body.ad-chat-page .ad-header-client {
  position: static;
  transform: none;
  margin-top: 0;
}

@media (min-width: 860px) {
  .ad-header-actions {
    right: 2rem;
    gap: 0.65rem;
  }

  .ad-header-train {
    font-size: 0.72rem;
    padding: 0.5rem 0.9rem;
  }
}

@media (max-width: 520px) {
  .ad-header-train {
    font-size: 0.62rem;
    padding: 0.4rem 0.55rem;
  }

  .ad-header-client {
    max-width: 28vw;
  }
}
.ad-header-client {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  margin-top: 0;
  background: #0f172a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill, 999px);
  padding: 0.5rem 0.85rem;
  font-family: var(--font-institucional);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ad-header-logout {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  margin-top: calc(var(--safe-top, 0px) / 2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ad-gray-tertiary, #8e8e93);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm, 4px);
  transition: color 0.15s;
}

.ad-header-logout:hover {
  color: var(--ad-orange-primary);
}

@media (min-width: 860px) {
  .ad-header-brand img {
    height: 76px;
  }

  
.ad-header-actions {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  margin-top: calc(var(--safe-top, 0px) / 2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ad-header-train {
  border: 1px solid rgba(255, 90, 0, 0.55);
  background: linear-gradient(135deg, rgba(255, 90, 0, 0.95), rgba(230, 57, 0, 0.92));
  color: #fff;
  font-family: var(--font-institucional);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill, 999px);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 90, 0, 0.28);
}

.ad-header-train:hover {
  filter: brightness(1.05);
}

body.ad-chat-page .ad-header-client {
  position: static;
  transform: none;
  margin-top: 0;
}

@media (min-width: 860px) {
  .ad-header-actions {
    right: 2rem;
    gap: 0.65rem;
  }

  .ad-header-train {
    font-size: 0.72rem;
    padding: 0.5rem 0.9rem;
  }
}

@media (max-width: 520px) {
  .ad-header-train {
    font-size: 0.62rem;
    padding: 0.4rem 0.55rem;
  }

  .ad-header-client {
    max-width: 28vw;
  }
}
.ad-header-client {
    right: 2rem;
    padding: 0.55rem 1rem;
    font-size: 0.78rem;
  }

  .ad-header-logout {
    left: 2rem;
  }
}

@media (min-width: 1024px) {
  .ad-header-brand img {
    height: 85px;
  }
}

@media (max-width: 420px) {
  
.ad-header-actions {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  margin-top: calc(var(--safe-top, 0px) / 2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ad-header-train {
  border: 1px solid rgba(255, 90, 0, 0.55);
  background: linear-gradient(135deg, rgba(255, 90, 0, 0.95), rgba(230, 57, 0, 0.92));
  color: #fff;
  font-family: var(--font-institucional);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill, 999px);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 90, 0, 0.28);
}

.ad-header-train:hover {
  filter: brightness(1.05);
}

body.ad-chat-page .ad-header-client {
  position: static;
  transform: none;
  margin-top: 0;
}

@media (min-width: 860px) {
  .ad-header-actions {
    right: 2rem;
    gap: 0.65rem;
  }

  .ad-header-train {
    font-size: 0.72rem;
    padding: 0.5rem 0.9rem;
  }
}

@media (max-width: 520px) {
  .ad-header-train {
    font-size: 0.62rem;
    padding: 0.4rem 0.55rem;
  }

  .ad-header-client {
    max-width: 28vw;
  }
}
.ad-header-client {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.45rem 0.65rem;
    font-size: 0.66rem;
  }

  .ad-header-logout {
    font-size: 0.66rem;
  }
}
