/*
 * Unnicora Portal UI v2.3.28
 * Camada de compatibilidade estritamente visual para a base funcional v1.0.3.25.
 * Não define rotas, ações, endpoints, campos, permissões ou regras de autenticação.
 */

/*
 * V2.3.24 — faixa de identidade visual nos cartões da agência.
 * O pseudo-elemento não recebe interação e não altera a estrutura dos cards.
 */
body.unni-portal {
  --unni-card-stripe: linear-gradient(
    90deg,
    #f20fae 0%,
    #cf14dc 17%,
    #7828ff 38%,
    #24c6df 61%,
    #68b993 79%,
    #f39a24 100%
  );
}

body.unni-portal :where(
  .hero,
  .intro,
  .card,
  .panel,
  .section,
  .step,
  .summary-strip,
  .summary-card,
  .attention-panel,
  .attention-item,
  .projects-panel,
  .client-row,
  .tools-panel,
  .tool-link,
  .include-bar,
  .metric,
  .user-card,
  .group,
  .client-uploads,
  .delivery,
  .event,
  .contract-total,
  .contract-status-card,
  .ai-consent-card,
  .summary article
) {
  position: relative;
}

/* O próprio raio de cada cartão recorta a faixa, inclusive em cards estreitos. */
body.unni-portal :where(
  .hero,
  .intro,
  .card,
  .panel,
  .section,
  .step,
  .summary-strip,
  .summary-card,
  .attention-panel,
  .attention-item,
  .tools-panel,
  .tool-link,
  .include-bar,
  .metric,
  .user-card,
  .group,
  .client-uploads,
  .delivery,
  .event,
  .contract-total,
  .contract-status-card,
  .ai-consent-card,
  .summary article
) {
  overflow: hidden;
  overflow: clip;
}

body.unni-portal :where(
  .hero,
  .intro,
  .card,
  .panel,
  .section,
  .step,
  .summary-strip,
  .summary-card,
  .attention-panel,
  .attention-item,
  .projects-panel,
  .client-row,
  .tools-panel,
  .tool-link,
  .include-bar,
  .metric,
  .user-card,
  .group,
  .client-uploads,
  .delivery,
  .event,
  .contract-total,
  .contract-status-card,
  .ai-consent-card,
  .summary article
)::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--unni-card-stripe);
  pointer-events: none;
}

/* Linhas de clientes contêm menus flutuantes: a faixa recebe respiro sem recortar o menu. */
body.unni-portal :where(.projects-panel, .client-row)::before {
  right: 12px;
  left: 12px;
  border-radius: 999px;
}

@media (max-width: 700px) {
  body.unni-portal :where(
    .hero,
    .intro,
    .card,
    .panel,
    .section,
    .step,
    .summary-strip,
    .summary-card,
    .attention-panel,
    .attention-item,
    .projects-panel,
    .client-row,
    .tools-panel,
    .tool-link,
    .include-bar,
    .metric,
    .user-card,
    .group,
    .client-uploads,
    .delivery,
    .event,
    .contract-total,
    .contract-status-card,
    .ai-consent-card,
    .summary article
  )::before {
    height: 3px;
  }
}

body.unni-portal :where(.topbar, .top) {
  min-height: 64px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--unni-line);
  border-radius: 20px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--unni-shadow-sm);
}

body.unni-portal .topbar {
  min-height: 76px;
}

body.unni-portal .topbar :where(.brand, .top-actions, .topbar-actions) {
  min-width: 0;
}

body.unni-portal .topbar .brand > img,
body.unni-portal .topbar .brand-symbol {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
}

body.unni-portal .topbar .brand-symbol img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

body.unni-portal .topbar .brand h1,
body.unni-portal .topbar .brand strong {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

body.unni-portal :where(.search input, .logout-button, .profile-chip, .back, .top-actions .button) {
  min-height: 44px;
}

body.unni-portal :where(.hero h1, .intro h2) {
  font-size: clamp(2rem, 4.2vw, 3.55rem);
  line-height: 0.98;
  letter-spacing: -0.052em;
}

body.unni-portal :where(.panel h2, .section-title h2, .card h2) {
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

body.unni-portal :where(.badge, .pill, .status, .notice, .flash) {
  border-color: var(--unni-line);
}

body.unni-portal :where(.back, .section-title a) {
  color: var(--unni-blue);
}

body.unni-portal :where(.footer) {
  color: var(--unni-muted);
}

body.unni-portal :where(.action-menu summary, .mobile-tools-toggle, .back-to-top) {
  min-width: 44px;
  min-height: 44px;
}

body.unni-auth .shell {
  width: min(1080px, 100%);
}

body.unni-auth :where(.form-panel) {
  width: 100%;
  max-width: none;
}

body.unni-auth :where(.logo, .brand-logo) {
  height: auto;
}

body.unni-auth :where(.toggle-password, .back) {
  min-width: 44px;
  min-height: 44px;
}

body.unni-client .topbar .logo {
  width: clamp(145px, 22vw, 205px);
  height: auto;
  object-fit: contain;
}

body.unni-client :where(.client-logout, .agency a, .button, .copy-button) {
  min-height: 44px;
}

body.unni-client .client-portal-title {
  color: var(--unni-navy-900) !important;
}

@media (max-width: 760px) {
  body.unni-portal :where(.topbar, .top) {
    min-height: 64px;
    padding: 8px 10px;
    border-radius: 18px;
  }

  body.unni-portal .topbar .brand > img,
  body.unni-portal .topbar .brand-symbol {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  body.unni-portal .topbar .brand-symbol img {
    width: 40px;
    height: 40px;
  }

  body.unni-portal :where(.top-actions, .topbar-actions) {
    gap: 6px;
  }

  body.unni-portal :where(.hero h1, .intro h2) {
    font-size: clamp(1.85rem, 9vw, 2.55rem);
  }

  body.unni-auth .shell {
    width: 100%;
  }

  body.unni-client .topbar .logo {
    width: 138px;
  }
}

@media (max-width: 430px) {
  body.unni-portal .topbar .brand h1,
  body.unni-portal .topbar .brand strong {
    font-size: 1rem;
  }

  body.unni-portal :where(.top-actions .button, .topbar-actions .logout-button) {
    min-height: 44px;
    padding-inline: 10px;
  }
}

@supports (-webkit-touch-callout: none) {
  body.unni-ui {
    min-height: -webkit-fill-available;
  }

  body.unni-ui :where(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea
  ) {
    font-size: 16px;
  }
}

/*
 * Padronização integral v2.1.3
 * Mantém o contrato funcional das páginas e corrige somente apresentação,
 * ergonomia, consistência e adaptação entre navegadores.
 */

body.unni-portal {
  --portal-content: 1180px;
  --portal-card-padding: clamp(18px, 2.4vw, 28px);
  --portal-control-height: 48px;
  --portal-check-size: 20px;
}

body.unni-portal :where(.shell, .app-shell) {
  width: min(var(--portal-content), calc(100% - 32px));
  max-width: var(--portal-content);
  padding-bottom: max(36px, calc(22px + env(safe-area-inset-bottom, 0px)));
}

body.unni-portal :where(.topbar, .top) {
  top: max(9px, env(safe-area-inset-top, 0px));
}

body.unni-portal :where(.card, .panel, .section, .step, .intro) {
  min-width: 0;
}

body.unni-portal :where(.card, .panel, .section, .step) {
  border: 1px solid var(--unni-line);
  background: var(--unni-white);
  box-shadow: var(--unni-shadow-xs);
}

body.unni-portal :where(.panel, .section, .step) {
  padding: var(--portal-card-padding);
}

body.unni-portal :where(.hero, .intro) {
  overflow: hidden;
}

body.unni-portal :where(.hero h1, .intro h2) {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

body.unni-portal :where(.panel h2, .section h3, .section-title h2, .card h2) {
  font-size: clamp(1.3rem, 2.1vw, 1.7rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

body.unni-portal :where(.panel p, .section p, .card-intro, .help, .fine, .contract-help) {
  overflow-wrap: anywhere;
  line-height: 1.55;
}

body.unni-portal :where(.grid, .fields, .layout, .split, .panels, .services-grid) > * {
  min-width: 0;
}

body.unni-portal .field {
  min-width: 0;
}

body.unni-portal .field > label {
  color: var(--unni-muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.035em;
}

body.unni-portal :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-width: 0;
  max-width: 100%;
  border-color: var(--unni-line-strong);
  color: var(--unni-ink);
  background: var(--unni-white);
  font-size: 0.94rem;
}

body.unni-portal :where(input:not([type="checkbox"]):not([type="radio"]), select) {
  min-height: var(--portal-control-height);
  padding-inline: 13px;
}

body.unni-portal textarea {
  min-height: 92px;
  padding: 12px 13px;
  line-height: 1.5;
  resize: vertical;
}

body.unni-portal :where(input, textarea)::placeholder {
  color: #8b94aa;
  opacity: 1;
}

body.unni-portal :where(input, select, textarea):disabled,
body.unni-portal :where(input, textarea)[readonly] {
  opacity: 1;
  color: #737d94;
  border-color: #e0e4ed;
  background: #f3f5f9;
  -webkit-text-fill-color: #737d94;
}

body.unni-portal :where(input, textarea):disabled::placeholder,
body.unni-portal :where(input, textarea)[readonly]::placeholder {
  color: #9aa2b4;
  opacity: 1;
  -webkit-text-fill-color: #9aa2b4;
}

body.unni-portal :where(input[type="checkbox"], input[type="radio"]) {
  width: var(--portal-check-size);
  min-width: var(--portal-check-size);
  max-width: var(--portal-check-size);
  height: var(--portal-check-size);
  min-height: var(--portal-check-size);
  flex-basis: var(--portal-check-size);
}

body.unni-portal label.check {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--unni-ink);
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}

body.unni-portal :where(.actions, .top-actions, .topbar-actions) {
  align-items: center;
  gap: 8px;
}

body.unni-portal :where(.button, .submit, .logout-button, .back) {
  min-height: 44px;
}

body.unni-portal .back {
  display: inline-flex;
  align-items: center;
}

body.unni-portal :where(.notice, .warning, .flash, .form-message) {
  overflow-wrap: anywhere;
  line-height: 1.5;
}

body.unni-portal :where(.footer) {
  padding-bottom: max(2px, env(safe-area-inset-bottom, 0px));
}

/* Painel principal. */
body.unni-portal :where(.tools-head, .panel-head, .projects-title-row, .section-head) {
  align-items: flex-start;
}

body.unni-portal :where(.tools-head h2, .panel-head h2, .projects-title-row h2, .section-head h3) {
  margin-top: 0;
}

body.unni-portal .tool-link {
  min-width: 0;
}

body.unni-portal .tool-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.unni-portal .filter-button {
  min-height: 44px;
  white-space: nowrap;
}

body.unni-portal .client-list {
  align-items: start;
}

body.unni-portal .summary-card {
  min-width: 0;
}

/* Usuários e perfis. */
body.unni-users .hero {
  padding-block: clamp(22px, 3vw, 30px) !important;
}

body.unni-users .hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

body.unni-users .layout {
  align-items: start;
}

body.unni-users .card {
  padding: var(--portal-card-padding);
}

body.unni-users .metrics {
  min-width: min(100%, 330px);
}

body.unni-users .metric {
  min-width: 0;
  padding: 12px;
}

body.unni-users label.check {
  padding: 10px 12px;
  border: 1px solid var(--unni-line);
  border-radius: 13px;
  background: var(--unni-surface-50);
}

body.unni-users .user-card {
  min-width: 0;
  border-color: var(--unni-line);
  background: var(--unni-surface-50);
}

body.unni-users :where(.profile-editor, .crop-dialog) {
  border-color: var(--unni-theme-line, var(--unni-line));
  color: var(--unni-theme-text, var(--unni-ink));
  background: var(--unni-theme-surface-soft, var(--unni-surface-50));
}

body.unni-users .crop-guide {
  box-shadow: 0 0 0 999px rgb(1 3 35 / 38%);
}

body.unni-users .crop-status {
  color: var(--unni-danger);
}

/* Segurança, configuração e instruções. */
body.unni-security .checks {
  align-items: stretch;
}

body.unni-security .check {
  min-width: 0;
  border-color: var(--unni-line);
  color: var(--unni-ink);
  background: var(--unni-surface-50);
}

body.unni-security .check small {
  color: var(--unni-muted);
  line-height: 1.45;
}

body.unni-security .panels {
  align-items: start;
}

body.unni-security .panel form + form,
body.unni-security .panel form + p,
body.unni-security .panel p + form {
  margin-top: 10px;
}

body.unni-security .warning {
  border: 1px solid #f3dfaa;
  border-left-width: 4px;
  border-radius: 12px;
  color: var(--unni-warning);
  background: var(--unni-warning-soft);
}

body.unni-security .totp-help {
  color: var(--unni-ink);
}

body.unni-security .secret-key,
body.unni-guide .code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.unni-guide :where(p, li, strong, a) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.unni-guide .step {
  margin-block: 12px;
}

body.unni-guide .step :where(ol, ul) {
  padding-left: 22px;
}

body.unni-settings .summary,
body.unni-settings .secure-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* servidor local e credenciais de cliente. */
body.unni-storage {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
}

body.unni-storage main {
  width: min(680px, 100%);
}

body.unni-storage .card {
  padding: clamp(22px, 5vw, 42px);
}

body.unni-storage .logo {
  width: 64px;
  height: 64px;
}

body.unni-client-access .credential {
  min-width: 0;
}

body.unni-client-access .password {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Autenticação e área do cliente. */
body.unni-auth :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-width: 0;
  max-width: 100%;
  font-size: 16px;
}

body.unni-auth :where(.card, .form-panel) {
  border-color: var(--unni-line);
  color: var(--unni-ink);
  background: var(--unni-white);
  box-shadow: var(--unni-shadow-sm);
}

body.unni-auth :where(.field label, .form-intro, .hint, .fine-print, .message) {
  line-height: 1.5;
}

body.unni-auth :where(.field label, form > label) {
  color: var(--unni-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.unni-auth :where(.input-shell, .field) {
  min-width: 0;
}

body.unni-auth :where(.submit, button[type="submit"], .button) {
  min-height: 48px;
}

body.unni-two-factor .card {
  width: min(500px, 100%);
  padding: clamp(24px, 6vw, 40px);
  border-radius: 26px;
}

body.unni-two-factor h1 {
  font-size: clamp(2rem, 7vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

body.unni-two-factor input[name="code"] {
  letter-spacing: 0.22em;
}

body.unni-client-login :where(.page, .card) {
  min-width: 0;
}

body.unni-client-dashboard :where(.section, .status-card, .material, .approval-item) {
  min-width: 0;
}

body.unni-client-dashboard :where(.quick-nav, .presence-kit-nav) a,
body.unni-client-dashboard :where(.button, .copy-button, .client-logout) {
  height: auto;
  min-height: 44px !important;
}

body.unni-client-dashboard :where(.bio-text, .kit-model-body, .approval-help, .material-meta) {
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  body.unni-portal :where(.button, .submit, .filter-button, .tool-link, .user-card) {
    transition:
      border-color 160ms ease,
      background-color 160ms ease,
      box-shadow 160ms ease,
      transform 160ms ease;
  }

  body.unni-portal :where(.button, .submit, .filter-button, .tool-link):hover {
    border-color: var(--unni-line-strong);
  }

  body.unni-portal .tool-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--unni-shadow-sm);
  }
}

@media (max-width: 900px) {
  body.unni-portal :where(.layout, .panels) {
    grid-template-columns: 1fr;
  }

  body.unni-users .metrics {
    width: 100%;
  }
}

@media (max-width: 760px) {
  body.unni-portal :where(.shell, .app-shell) {
    width: 100%;
    max-width: none;
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
  }

  body.unni-portal :where(.topbar, .top) {
    top: max(7px, env(safe-area-inset-top, 0px));
  }

  body.unni-portal :where(.hero, .intro) {
    padding: 22px 17px !important;
  }

  body.unni-portal :where(.hero h1, .intro h2) {
    font-size: clamp(1.95rem, 10vw, 2.55rem);
  }

  body.unni-portal :where(.panel, .section, .step, .card) {
    border-radius: 20px;
  }

  body.unni-portal :where(.panel, .section, .step) {
    padding: 17px 14px;
  }

  body.unni-portal :where(.section-head, .panel-head, .projects-title-row) {
    display: grid;
    gap: 6px;
  }

  body.unni-portal :where(.section-head p, .panel-head p, .projects-title-row p) {
    max-width: none;
    padding-top: 0;
    text-align: left;
  }

  body.unni-portal :where(.grid, .fields, .split) {
    grid-template-columns: 1fr;
  }

  body.unni-portal :where(.field.full, .field--full) {
    grid-column: auto;
  }

  body.unni-portal :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px;
  }

  body.unni-portal .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.unni-portal .actions :where(.button, button, a) {
    width: 100%;
  }

  body.unni-users .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.unni-users .user-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  body.unni-users .edit-link {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.unni-security :where(.checks, .fields, .fields.provider-fields, .totp-setup) {
    grid-template-columns: 1fr;
  }

  body.unni-security .totp-qr {
    width: min(224px, 100%);
    height: auto;
  }

  body.unni-storage {
    padding-inline: max(10px, env(safe-area-inset-left, 0px));
  }

  body.unni-client-dashboard :where(.status-grid, .kit-two-columns, .kit-bio-grid, .approval-group-items) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  body.unni-portal :where(.top-actions, .topbar-actions) {
    gap: 5px;
  }

  body.unni-portal :where(.top-actions .button, .top-actions .back, .topbar-actions .button) {
    padding-inline: 9px;
    font-size: 0.72rem;
  }

  body.unni-users .metrics {
    gap: 6px;
  }

  body.unni-users .metric {
    padding: 10px 8px;
  }
}

/*
 * Portal UI v2.2.3 — sistema global de botões.
 * O gradiente do canal WhatsApp passa a ser o padrão visual de todas as ações.
 * Controles de navegação, filtros e ações destrutivas preservam sua hierarquia.
 */
body.unni-ui {
  --unni-action-gradient: linear-gradient(
    110deg,
    #f20fae 0%,
    #7828ff 56%,
    #24c6df 100%
  );
  --unni-action-shadow: 0 10px 24px rgb(120 40 255 / 22%);
  --unni-action-shadow-hover: 0 15px 32px rgb(120 40 255 / 30%);
  --unni-action-radius: 14px;
  --unni-action-focus: 0 0 0 4px rgb(105 55 255 / 20%);
}

/*
 * Ações principais e secundárias recebem a mesma aparência.
 * O uso de !important neutraliza regras históricas locais sem alterar marcação,
 * eventos, endpoints ou o comportamento funcional de cada controle.
 */
body.unni-ui :where(
  .button,
  .submit,
  .primary-button,
  .approval-save,
  .copy-button,
  .logout-button,
  .client-logout,
  .unni-standard-back,
  .unni-standard-action,
  .secondary-button,
  .os-upload-shortcut,
  .dashboard-collapsible-toggle,
  .inactive-toggle,
  button.primary,
  button[type="submit"]
) {
  display: inline-flex !important;
  min-height: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 17px !important;
  border: 1px solid rgb(255 255 255 / 24%) !important;
  border-radius: var(--unni-action-radius) !important;
  color: var(--unni-white) !important;
  background: var(--unni-action-gradient) !important;
  box-shadow: var(--unni-action-shadow) !important;
  cursor: pointer;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;
  transition:
    transform 170ms ease,
    filter 170ms ease,
    box-shadow 170ms ease !important;
}

body.unni-client-dashboard :where(
  .os-delivery-card .button,
  .os-approval-list .button,
  #canais .material .button,
  .upload-panel .button,
  .approval-item .button
) {
  border-color: rgb(255 255 255 / 24%) !important;
  color: var(--unni-white) !important;
  background: var(--unni-action-gradient) !important;
  box-shadow: var(--unni-action-shadow) !important;
}

body.unni-ui :where(
  .button,
  .submit,
  .primary-button,
  .approval-save,
  .copy-button,
  .logout-button,
  .client-logout,
  .unni-standard-back,
  .unni-standard-action,
  .secondary-button,
  .os-upload-shortcut,
  .dashboard-collapsible-toggle,
  .inactive-toggle,
  button.primary,
  button[type="submit"]
):focus-visible {
  outline: 0 !important;
  box-shadow:
    var(--unni-action-shadow),
    var(--unni-action-focus) !important;
}

body.unni-ui :where(
  .button,
  .submit,
  .primary-button,
  .approval-save,
  .copy-button,
  .logout-button,
  .client-logout,
  .unni-standard-back,
  .unni-standard-action,
  .secondary-button,
  .os-upload-shortcut,
  .dashboard-collapsible-toggle,
  .inactive-toggle,
  button.primary,
  button[type="submit"]
):active {
  filter: brightness(0.98) saturate(1.04);
  transform: translateY(0) scale(0.985) !important;
  box-shadow: 0 6px 15px rgb(120 40 255 / 19%) !important;
}

@media (hover: hover) and (pointer: fine) {
  body.unni-ui :where(
    .button,
    .submit,
    .primary-button,
    .approval-save,
    .copy-button,
    .logout-button,
    .client-logout,
    .unni-standard-back,
    .unni-standard-action,
    .secondary-button,
    .os-upload-shortcut,
    .dashboard-collapsible-toggle,
    .inactive-toggle,
    button.primary,
    button[type="submit"]
  ):hover {
    border-color: rgb(255 255 255 / 38%) !important;
    color: var(--unni-white) !important;
    filter: brightness(1.06) saturate(1.08);
    transform: translateY(-2px) !important;
    box-shadow: var(--unni-action-shadow-hover) !important;
  }
}

/*
 * Exceções semânticas: ações perigosas continuam vermelhas para evitar erros,
 * mas usam as mesmas dimensões, movimento e acabamento do restante do portal.
 */
body.unni-ui :where(
  .button.danger,
  .button--danger,
  .action.reject,
  button.danger,
  button[data-action="delete"],
  button[data-action="revoke"]
) {
  border-color: #df3654 !important;
  color: #fff !important;
  background: linear-gradient(110deg, #b42335, #e14766) !important;
  box-shadow: 0 10px 24px rgb(180 35 53 / 20%) !important;
}

@media (hover: hover) and (pointer: fine) {
  body.unni-ui :where(
    .button.danger,
    .button--danger,
    .action.reject,
    button.danger,
    button[data-action="delete"],
    button[data-action="revoke"]
  ):hover {
    box-shadow: 0 15px 32px rgb(180 35 53 / 27%) !important;
  }
}

/*
 * Filtros e abas são controles de navegação: permanecem leves quando inativos
 * e recebem o mesmo gradiente somente no estado selecionado.
 */
body.unni-ui :where(.filter-button, .os-tab, .presence-kit-tab) {
  border: 1px solid var(--unni-line-strong) !important;
  border-radius: var(--unni-action-radius) !important;
  color: var(--unni-navy-900) !important;
  background: var(--unni-white) !important;
  box-shadow: var(--unni-shadow-xs) !important;
  transition:
    border-color 170ms ease,
    color 170ms ease,
    background 170ms ease,
    transform 170ms ease,
    box-shadow 170ms ease !important;
}

body.unni-ui :where(
  .filter-button[aria-pressed="true"],
  .filter-button.is-active,
  .os-tab[aria-selected="true"],
  .presence-kit-tab[aria-selected="true"]
) {
  border-color: transparent !important;
  color: var(--unni-white) !important;
  background: var(--unni-action-gradient) !important;
  box-shadow: var(--unni-action-shadow) !important;
}

body.unni-ui :where(.filter-button, .os-tab, .presence-kit-tab):focus-visible {
  outline: 0 !important;
  box-shadow:
    var(--unni-shadow-xs),
    var(--unni-action-focus) !important;
}

@media (hover: hover) and (pointer: fine) {
  body.unni-ui :where(.filter-button, .os-tab, .presence-kit-tab):hover {
    border-color: #bca8ff !important;
    color: var(--unni-violet) !important;
    background: #f3efff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgb(105 55 255 / 12%) !important;
  }

  body.unni-ui :where(
    .filter-button[aria-pressed="true"],
    .filter-button.is-active,
    .os-tab[aria-selected="true"],
    .presence-kit-tab[aria-selected="true"]
  ):hover {
    border-color: rgb(255 255 255 / 34%) !important;
    color: var(--unni-white) !important;
    background: var(--unni-action-gradient) !important;
    filter: brightness(1.055) saturate(1.07);
    box-shadow: var(--unni-action-shadow-hover) !important;
  }
}

/*
 * Controles utilitários e menus repetidos usam a mesma geometria e foco,
 * com preenchimento leve para não competir com as ações principais.
 */
body.unni-ui :where(
  .toggle,
  .toggle-password,
  .status-dialog__close,
  .action-menu > summary,
  .unni-os-menu-button,
  .back-to-top,
  .presence-kit-close,
  .crop-close,
  .remove-event
) {
  border: 1px solid var(--unni-line-strong) !important;
  border-radius: var(--unni-action-radius) !important;
  color: var(--unni-violet) !important;
  background: var(--unni-white) !important;
  box-shadow: var(--unni-shadow-xs) !important;
  cursor: pointer;
  transition:
    border-color 170ms ease,
    color 170ms ease,
    background 170ms ease,
    transform 170ms ease,
    box-shadow 170ms ease !important;
}

body.unni-ui :where(
  .toggle,
  .toggle-password,
  .status-dialog__close,
  .action-menu > summary,
  .unni-os-menu-button,
  .back-to-top,
  .presence-kit-close,
  .crop-close,
  .remove-event
):focus-visible {
  outline: 0 !important;
  box-shadow:
    var(--unni-shadow-xs),
    var(--unni-action-focus) !important;
}

@media (hover: hover) and (pointer: fine) {
  body.unni-ui :where(
    .toggle,
    .toggle-password,
    .status-dialog__close,
    .action-menu > summary,
    .unni-os-menu-button,
    .back-to-top,
    .presence-kit-close,
    .crop-close,
    .remove-event
  ):hover {
    border-color: #bca8ff !important;
    color: var(--unni-violet) !important;
    background: #f3efff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgb(105 55 255 / 12%) !important;
  }
}

body.unni-ui .remove-event {
  border-color: #f2bfd2 !important;
  color: var(--unni-danger) !important;
  background: var(--unni-danger-soft) !important;
}

@media (hover: hover) and (pointer: fine) {
  body.unni-ui .remove-event:hover {
    border-color: #df3654 !important;
    color: #fff !important;
    background: linear-gradient(110deg, #b42335, #e14766) !important;
    box-shadow: 0 10px 24px rgb(180 35 53 / 22%) !important;
  }
}

body.unni-ui :where(
  button,
  .button,
  .submit,
  .approval-save,
  .copy-button,
  .filter-button,
  .os-tab,
  .presence-kit-tab,
  .os-upload-shortcut
):disabled,
body.unni-ui :where(
  .button,
  .submit,
  .approval-save,
  .copy-button,
  .filter-button,
  .os-tab,
  .presence-kit-tab,
  .os-upload-shortcut
)[aria-disabled="true"] {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.22) !important;
  transform: none !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  body.unni-ui :where(
    .button,
    .submit,
    .primary-button,
    .approval-save,
    .copy-button,
    .logout-button,
    .client-logout,
    .unni-standard-back,
    .unni-standard-action,
    .secondary-button,
    .os-upload-shortcut,
    .dashboard-collapsible-toggle,
    .inactive-toggle,
    button.primary,
    button[type="submit"]
  ) {
    min-height: 46px !important;
    padding-inline: 14px !important;
  }

  body.unni-client-dashboard .os-upload-shortcut {
    min-width: 46px !important;
    width: 46px;
    padding: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.unni-ui :where(
    button,
    .button,
    .submit,
    .approval-save,
    .copy-button,
    .filter-button,
    .os-tab,
    .presence-kit-tab,
    .os-upload-shortcut,
    .unni-standard-back,
    .unni-standard-action
  ) {
    transition-duration: 0.01ms !important;
  }

  body.unni-ui :where(
    button,
    .button,
    .submit,
    .approval-save,
    .copy-button,
    .filter-button,
    .os-tab,
    .presence-kit-tab,
    .os-upload-shortcut,
    .unni-standard-back,
    .unni-standard-action
  ):hover,
  body.unni-ui :where(
    button,
    .button,
    .submit,
    .approval-save,
    .copy-button,
    .filter-button,
    .os-tab,
    .presence-kit-tab,
    .os-upload-shortcut,
    .unni-standard-back,
    .unni-standard-action
  ):active {
    transform: none !important;
  }
}

/* Reforço de especificidade para os controles históricos do cabeçalho. */
body.unni-ui .unni-standard-actions .logout-button,
body.unni-ui .unni-standard-actions .client-logout,
body.unni-ui .unni-standard-back,
body.unni-ui .unni-standard-action,
body.unni-dashboard .dashboard-collapsible-toggle,
body.unni-dashboard .inactive-toggle {
  min-height: 48px !important;
  padding: 0 17px !important;
  border: 1px solid rgb(255 255 255 / 24%) !important;
  border-radius: var(--unni-action-radius) !important;
  color: var(--unni-white) !important;
  background: var(--unni-action-gradient) !important;
  box-shadow: var(--unni-action-shadow) !important;
}

@media (hover: hover) and (pointer: fine) {
  body.unni-ui .unni-standard-actions .logout-button:hover,
  body.unni-ui .unni-standard-actions .client-logout:hover,
  body.unni-ui .unni-standard-back:hover,
  body.unni-ui .unni-standard-action:hover,
  body.unni-dashboard .dashboard-collapsible-summary:hover
    .dashboard-collapsible-toggle,
  body.unni-dashboard .inactive-panel-summary:hover .inactive-toggle {
    border-color: rgb(255 255 255 / 38%) !important;
    color: var(--unni-white) !important;
    background: var(--unni-action-gradient) !important;
    filter: brightness(1.06) saturate(1.08);
    transform: translateY(-2px) !important;
    box-shadow: var(--unni-action-shadow-hover) !important;
  }
}

@media (max-width: 760px) {
  body.unni-ui .unni-standard-back,
  body.unni-ui .unni-standard-action {
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
  }

  body.unni-ui .unni-standard-actions .logout-button,
  body.unni-ui .unni-standard-actions .client-logout {
    min-height: 44px !important;
    padding-inline: 11px !important;
  }
}

/*
 * Portal UI v2.2.4 — Aprovações compactas.
 * Cada material vira um card vertical e a lista usa duas colunas somente
 * quando há largura suficiente. Ações mantêm alvo de toque de 44 px.
 */
body.unni-client-dashboard #panel-approvals .os-window-body {
  padding: clamp(18px, 2.2vw, 28px);
}

body.unni-client-dashboard #panel-approvals .os-project-head {
  margin-bottom: clamp(16px, 2vw, 22px);
}

body.unni-client-dashboard #panel-approvals .os-approval-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

body.unni-client-dashboard #panel-approvals .approval-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 15px;
  border-radius: 16px;
}

body.unni-client-dashboard #panel-approvals .material-content {
  display: grid;
  align-content: start;
  min-width: 0;
}

body.unni-client-dashboard #panel-approvals .material-meta {
  gap: 6px;
  margin-bottom: 8px;
}

body.unni-client-dashboard #panel-approvals .material-content > p {
  margin-top: 5px;
  line-height: 1.4;
}

body.unni-client-dashboard #panel-approvals .approval-item .button {
  width: 100%;
  min-height: 44px !important;
  margin-top: 12px;
  padding: 0 14px !important;
  border-radius: 13px !important;
  font-size: 0.72rem !important;
}

body.unni-client-dashboard #panel-approvals .approval-control {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 13px 0 0;
  border-top: 1px solid #e0e3ed;
  border-left: 0;
}

body.unni-client-dashboard #panel-approvals .approval-control-head {
  gap: 8px;
  margin-bottom: 0;
}

body.unni-client-dashboard #panel-approvals .approval-help {
  margin: 0;
}

body.unni-client-dashboard #panel-approvals .approval-control select,
body.unni-client-dashboard #panel-approvals .approval-save {
  min-height: 44px !important;
}

body.unni-client-dashboard #panel-approvals .approval-save {
  padding: 0 14px !important;
  border-radius: 13px !important;
  font-size: 0.72rem !important;
}

body.unni-client-dashboard #panel-approvals .approval-feedback {
  padding: 8px 9px;
}

@media (max-width: 940px) {
  body.unni-client-dashboard #panel-approvals .os-approval-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body.unni-client-dashboard #panel-approvals .os-window-body {
    padding: 16px 12px;
  }

  body.unni-client-dashboard #panel-approvals .os-approval-list {
    gap: 10px;
  }

  body.unni-client-dashboard #panel-approvals .approval-item {
    gap: 12px;
    padding: 13px;
  }

  body.unni-client-dashboard #panel-approvals .approval-control {
    padding-top: 12px;
  }
}

/*
 * Portal UI v2.2.5 — navegação, canais e cartões de aprovação.
 * A área de materiais concentra visualização e decisão em uma única aba.
 */
body.unni-client-dashboard #panel-approvals .approval-control {
  border-top: 0;
}

@media (min-width: 981px) {
  body.unni-client-dashboard #canais .materials {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body.unni-client-dashboard #canais .materials {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  body.unni-client-dashboard #canais .material {
    min-height: 0;
    padding: 14px;
  }
}

/*
 * Portal UI v2.2.6 — canais como links de texto.
 * Remove a coluna reservada aos botões e mantém cada identificação em uma linha.
 */
body.unni-client-dashboard #canais .channel-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  align-items: start;
  gap: 8px;
  min-height: 96px;
}

body.unni-client-dashboard #canais .channel-content {
  min-width: 0;
}

body.unni-client-dashboard #canais .channel-card h3 {
  max-width: 100%;
  margin: 8px 0 0;
  overflow: hidden;
  font-size: clamp(0.84rem, 1.45vw, 1.08rem);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.unni-client-dashboard #canais .channel-link {
  display: inline;
  color: #5527c8;
  text-decoration: underline;
  text-decoration-color: rgb(120 40 255 / 35%);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

body.unni-client-dashboard #canais .channel-link:hover {
  color: #d10b9d;
  text-decoration-color: currentColor;
}

body.unni-client-dashboard #canais .channel-link:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgb(105 55 255 / 24%);
  outline-offset: 3px;
}

body.unni-client-dashboard #canais .channel-card .pending {
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 700px) {
  body.unni-client-dashboard #canais .channel-card {
    min-height: 82px;
  }

  body.unni-client-dashboard #canais .channel-card h3 {
    font-size: 0.82rem;
  }
}

/*
 * Portal UI v2.2.7 — responsividade integral, autenticação padronizada,
 * avaliações compactas e canais no sistema de cartões.
 */
html {
  min-width: 0;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.unni-ui {
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

body.unni-ui :where(
  .shell,
  .app-shell,
  .page,
  .content,
  .panel,
  .section,
  .card,
  .os-console,
  .os-panel,
  .os-window,
  .os-window-body,
  .approval-item,
  .approval-control,
  .channel-card
) {
  min-width: 0;
}

body.unni-ui :where(img, video, iframe, canvas, svg) {
  max-inline-size: 100%;
}

body.unni-ui :where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  min-width: 0;
  max-width: 100%;
  font-size: 16px;
}

body.unni-ui :where(.shell, .app-shell) {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

body.unni-ui .unni-standard-title {
  max-width: min(42vw, 560px) !important;
  padding-inline: 14px !important;
  font-size: clamp(1.22rem, 2vw, 1.55rem) !important;
  line-height: 1.16 !important;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
}

/* As três entradas usam a mesma composição, escala e acabamento. */
body.unni-auth-layout {
  display: block !important;
  min-height: 100vh !important;
  min-height: 100svh !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  overflow-x: clip !important;
  color: var(--unni-ink) !important;
  background:
    radial-gradient(circle at 0 0, rgb(255 20 147 / 7%), transparent 31rem),
    radial-gradient(circle at 100% 8%, rgb(18 223 255 / 8%), transparent 34rem),
    linear-gradient(145deg, #f8f5fb, #f2f5fb) !important;
}

body.unni-auth-layout::before {
  display: none !important;
}

body.unni-auth-layout .auth-page {
  width: min(1240px, calc(100% - 36px)) !important;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  margin-inline: auto !important;
  padding:
    max(26px, env(safe-area-inset-top, 0px))
    0
    max(22px, env(safe-area-inset-bottom, 0px)) !important;
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  gap: 24px !important;
}

body.unni-auth-layout .auth-topbar {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  min-height: 78px !important;
  margin: 0 !important;
  padding: 13px 20px !important;
  border: 1px solid rgb(221 223 234 / 88%) !important;
  border-radius: 23px !important;
  background: rgb(255 255 255 / 90%) !important;
  box-shadow: 0 15px 45px rgb(17 24 55 / 7%) !important;
}

body.unni-auth-layout .auth-topbar .unni-standard-brand {
  width: min(186px, 100%) !important;
}

body.unni-auth-layout .secure {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #68708c !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  white-space: nowrap;
}

body.unni-auth-layout .secure::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #21bd82;
  box-shadow: 0 0 0 5px rgb(33 189 130 / 10%);
}

body.unni-auth-layout .auth-center {
  display: grid !important;
  place-items: center !important;
  padding: 22px 0 !important;
}

body.unni-auth-layout .auth-card {
  width: min(640px, 100%) !important;
  min-height: 0 !important;
  padding: clamp(30px, 5vw, 52px) !important;
  border: 1px solid rgb(221 223 234 / 88%) !important;
  border-radius: 30px !important;
  color: var(--unni-ink) !important;
  background: rgb(255 255 255 / 96%) !important;
  box-shadow: 0 24px 70px rgb(17 24 55 / 10%) !important;
}

body.unni-auth-layout .auth-card :where(.kicker, .form-kicker) {
  color: var(--unni-violet) !important;
  font-size: 0.69rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.11em !important;
  text-transform: uppercase !important;
}

body.unni-auth-layout .auth-card :where(h1, h2) {
  margin: 12px 0 10px !important;
  color: var(--unni-navy-900) !important;
  font-size: clamp(2.85rem, 6vw, 4.55rem) !important;
  line-height: 0.94 !important;
  letter-spacing: -0.07em !important;
}

body.unni-auth-layout .auth-card .intro {
  margin: 0 !important;
  color: var(--unni-muted) !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
}

body.unni-auth-layout .auth-form {
  display: grid !important;
  gap: 10px !important;
  margin-top: 26px !important;
}

body.unni-auth-layout .auth-form > label {
  margin-top: 2px !important;
  color: var(--unni-muted) !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
}

body.unni-auth-layout .auth-input {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
}

body.unni-auth-layout .auth-form input {
  width: 100% !important;
  min-height: 54px !important;
  padding: 0 16px !important;
  border: 1px solid var(--unni-line-strong) !important;
  border-radius: 16px !important;
  outline: 0 !important;
  color: var(--unni-ink) !important;
  background: #f8f9fd !important;
  font-size: 16px !important;
}

body.unni-auth-layout .auth-input.code input {
  padding-left: 40px !important;
}

body.unni-auth-layout .auth-input--password input {
  padding-right: 54px !important;
}

body.unni-auth-layout .auth-form input:focus {
  border-color: var(--unni-blue) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgb(37 99 255 / 10%) !important;
}

body.unni-auth-layout .toggle-password {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  z-index: 2;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 1px solid var(--unni-line) !important;
  border-radius: 11px !important;
  transform: translateY(-50%) !important;
  color: var(--unni-violet) !important;
  background: #fff !important;
  box-shadow: var(--unni-shadow-xs) !important;
}

body.unni-auth-layout .auth-form :where(.button, .submit) {
  width: 100% !important;
  min-height: 52px !important;
  margin-top: 4px !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: #fff !important;
  background: var(--unni-action-gradient) !important;
  box-shadow: var(--unni-action-shadow) !important;
  font-weight: 900 !important;
}

body.unni-auth-layout :where(.message, .notice, .error) {
  margin: 16px 0 0 !important;
  padding: 12px 13px !important;
  border-radius: 14px !important;
  font-size: 0.8rem !important;
  line-height: 1.45 !important;
}

body.unni-auth-layout :where(.message.error, p.error) {
  border: 1px solid #f2bfd2 !important;
  color: #a61d54 !important;
  background: #ffedf4 !important;
}

body.unni-auth-layout :where(.message.ok, .notice) {
  border: 1px solid #bdebdc !important;
  color: #087d5c !important;
  background: #e8fff7 !important;
}

body.unni-auth-layout .support {
  margin: 20px 0 0 !important;
  padding-top: 17px !important;
  border-top: 1px solid var(--unni-line) !important;
  color: var(--unni-soft) !important;
  font-size: 0.75rem !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

body.unni-auth-layout .support :where(a, strong) {
  color: var(--unni-violet) !important;
  font-weight: 850 !important;
}

body.unni-auth-layout .auth-footer {
  display: flex !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 0 4px !important;
  color: #7d849c !important;
  font-size: 0.69rem !important;
}

/* Seleção e salvamento ocupam duas colunas compactas em qualquer celular. */
body.unni-client-dashboard #panel-approvals .approval-control {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "head head"
    "select save"
    "revision revision"
    "feedback feedback";
  align-items: start;
  gap: 8px;
}

body.unni-client-dashboard #panel-approvals .approval-control-head {
  grid-area: head;
}

body.unni-client-dashboard #panel-approvals .revision-box {
  grid-area: revision;
}

body.unni-client-dashboard #panel-approvals .approval-feedback {
  grid-area: feedback;
}

body.unni-client-dashboard #panel-approvals .approval-control select,
body.unni-client-dashboard #panel-approvals .approval-save {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding-inline: 10px !important;
  overflow: hidden;
  line-height: 1.1 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.unni-client-dashboard #panel-approvals .approval-control select {
  grid-area: select;
  font-size: 16px !important;
}

body.unni-client-dashboard #panel-approvals .approval-save {
  grid-area: save;
  font-size: clamp(0.64rem, 2.7vw, 0.72rem) !important;
}

body.unni-client-dashboard #panel-approvals .revision-box {
  position: relative;
  gap: 8px;
  margin-top: 2px;
  padding: 13px;
  border: 1px solid #d8c9ff;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgb(255 20 147 / 5%), rgb(107 33 245 / 6%)),
    #fff;
  box-shadow: 0 10px 28px rgb(107 33 245 / 10%);
}

body.unni-client-dashboard #panel-approvals .revision-box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--unni-action-gradient);
}

body.unni-client-dashboard #panel-approvals .revision-box label {
  color: #3d236f;
}

body.unni-client-dashboard #panel-approvals .revision-required {
  display: inline-flex;
  min-height: 22px;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #a61d54;
  background: #ffedf4;
  font-size: 0.56rem;
  line-height: 1;
  vertical-align: middle;
}

body.unni-client-dashboard #panel-approvals .revision-hint {
  color: #6b6380;
  font-size: 0.64rem;
  line-height: 1.4;
}

body.unni-client-dashboard #panel-approvals .revision-box textarea {
  min-height: 112px;
  border-color: #cbb8ff;
  background: #fff;
}

body.unni-client-dashboard #panel-approvals .revision-box textarea[aria-invalid="true"] {
  border-color: #d82c67;
  box-shadow: 0 0 0 4px rgb(216 44 103 / 12%);
}

body.unni-client-dashboard #panel-approvals .revision-attention {
  animation: unniRevisionAttention 780ms ease both;
}

@keyframes unniRevisionAttention {
  0% {
    box-shadow: 0 0 0 0 rgb(107 33 245 / 0%);
    transform: translateY(-2px);
  }
  45% {
    box-shadow: 0 0 0 7px rgb(107 33 245 / 13%);
  }
  100% {
    box-shadow: 0 10px 28px rgb(107 33 245 / 10%);
    transform: translateY(0);
  }
}

/* Seus canais seguem a mesma hierarquia visual dos demais cartões do portal. */
body.unni-client-dashboard #canais .channel-card {
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid #dfe3ed;
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgb(255 20 147 / 3%), rgb(18 223 255 / 3%)),
    #fff;
  box-shadow: 0 8px 24px rgb(17 24 55 / 5%);
}

body.unni-client-dashboard #canais .channel-card h3 {
  font-size: clamp(0.72rem, 1vw, 0.94rem);
}

body.unni-client-dashboard #canais .channel-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--unni-action-gradient);
  box-shadow: 0 8px 18px rgb(107 33 245 / 18%);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.06em;
}

body.unni-client-dashboard #canais .channel-card .pending {
  grid-column: 2;
}

body.unni-client-dashboard #canais .channel-link::after {
  content: " ↗";
  text-decoration: none;
}

@media (max-width: 980px) {
  body.unni-client-dashboard #canais .materials {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 981px) and (max-width: 1200px) {
  body.unni-client-dashboard #canais .channel-link::after {
    content: "";
  }
}

@media (min-width: 701px) and (max-width: 980px) {
  body.unni-ui .unni-standard-topbar {
    grid-template-columns: minmax(158px, 1fr) minmax(0, auto) minmax(158px, 1fr) !important;
  }

  body.unni-ui .unni-standard-title {
    max-width: 36vw !important;
    font-size: clamp(1.08rem, 2.4vw, 1.32rem) !important;
  }
}

@media (max-width: 700px) {
  body.unni-ui :where(.shell, .app-shell) {
    padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
  }

  body.unni-ui .unni-standard-title {
    max-width: 100% !important;
    padding-inline: 4px !important;
    font-size: clamp(1.05rem, 4.8vw, 1.22rem) !important;
    line-height: 1.18 !important;
  }

  body.unni-auth-layout .auth-page {
    width: min(100% - 18px, 1240px) !important;
    padding:
      max(9px, env(safe-area-inset-top, 0px))
      0
      max(9px, env(safe-area-inset-bottom, 0px)) !important;
    gap: 12px !important;
  }

  body.unni-auth-layout .auth-topbar {
    min-height: 98px !important;
    padding: 12px 14px !important;
    border-radius: 20px !important;
  }

  body.unni-auth-layout .auth-topbar .unni-standard-brand {
    width: 158px !important;
  }

  body.unni-auth-layout .auth-topbar .secure {
    display: none !important;
  }

  body.unni-auth-layout .auth-center {
    align-items: start !important;
    padding: 4px 0 !important;
  }

  body.unni-auth-layout .auth-card {
    padding: 30px 17px !important;
    border-radius: 24px !important;
  }

  body.unni-auth-layout .auth-card :where(h1, h2) {
    font-size: clamp(2.6rem, 13vw, 3.7rem) !important;
  }

  body.unni-auth-layout .auth-footer {
    padding: 3px 4px 7px !important;
    flex-direction: column !important;
    gap: 4px !important;
    text-align: center !important;
  }

  body.unni-client-dashboard #panel-approvals .approval-control {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding-top: 0;
  }

  body.unni-client-dashboard #panel-approvals .approval-control-head {
    align-items: flex-start;
    flex-direction: row;
  }

  body.unni-client-dashboard #panel-approvals .approval-control select,
  body.unni-client-dashboard #panel-approvals .approval-save {
    min-height: 42px !important;
    padding-inline: 7px !important;
  }

  body.unni-client-dashboard #canais .channel-card {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 94px;
    padding: 14px;
  }

  body.unni-client-dashboard #canais .channel-icon {
    width: 44px;
    height: 44px;
  }

  body.unni-client-dashboard #canais .channel-card h3 {
    font-size: 0.82rem;
  }
}

@media (max-width: 360px) {
  body.unni-auth-layout .auth-page {
    width: min(100% - 14px, 1240px) !important;
  }

  body.unni-auth-layout .auth-card {
    padding-inline: 14px !important;
  }

  body.unni-client-dashboard #panel-approvals .approval-control {
    gap: 6px !important;
  }

  body.unni-client-dashboard #panel-approvals .approval-save {
    min-height: 40px !important;
    padding-inline: 5px !important;
    font-size: 0.62rem !important;
  }

  body.unni-client-dashboard #panel-approvals .approval-control select {
    min-height: 40px !important;
    padding-inline: 5px !important;
    font-size: 16px !important;
  }

  body.unni-client-dashboard #canais .channel-card {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 11px 10px;
  }

  body.unni-client-dashboard #canais .channel-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  body.unni-client-dashboard #canais .channel-content > span {
    padding-right: 40px;
  }

  body.unni-client-dashboard #canais .channel-card h3 {
    font-size: 0.74rem;
  }

  body.unni-client-dashboard #canais .channel-card .pending {
    grid-column: 1;
  }

  body.unni-client-dashboard #canais .channel-link::after {
    content: "";
  }
}

@media (max-width: 300px) {
  body.unni-client-dashboard #panel-approvals .approval-control {
    grid-template-columns: minmax(112px, 1fr) minmax(54px, 0.45fr) !important;
  }

  body.unni-client-dashboard #panel-approvals .approval-control select {
    padding-right: 22px !important;
  }

  body.unni-client-dashboard #panel-approvals .approval-save {
    font-size: 0 !important;
  }

  body.unni-client-dashboard #panel-approvals .approval-save::after {
    content: "Salvar";
    font-size: 0.64rem;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (min-width: 701px) {
  body.unni-auth-layout .auth-page {
    padding-block: 12px !important;
    gap: 12px !important;
  }

  body.unni-auth-layout .auth-center {
    align-items: start !important;
    padding: 0 !important;
  }

  body.unni-auth-layout .auth-card {
    padding: 26px 34px !important;
  }

  body.unni-auth-layout .auth-card :where(h1, h2) {
    font-size: 3rem !important;
  }

  body.unni-auth-layout .auth-form {
    margin-top: 18px !important;
  }
}

@supports (-webkit-touch-callout: none) {
  body.unni-ui {
    min-height: -webkit-fill-available;
  }

  body.unni-ui :where(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea
  ) {
    font-size: 16px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.unni-client-dashboard #panel-approvals .revision-attention {
    animation: none;
  }
}

/* Pente-fino UNNI OS v2.3.13 — paleta sóbria, toque e responsividade. */
body.unni-ui {
  --unni-action-gradient: linear-gradient(135deg, #263b56, #36536f);
  --unni-action-shadow: 0 9px 22px rgb(22 38 58 / 20%);
  --unni-action-shadow-hover: 0 12px 28px rgb(22 38 58 / 26%);
  --unni-action-focus: rgb(86 124 159 / 32%);
}

body.unni-ui :where(
  .button,
  .secondary-button,
  .copy-button,
  .client-logout,
  .logout-button,
  .back,
  .unni-standard-back,
  .unni-standard-action,
  .open-button,
  .management-button
) {
  border: 1px solid rgb(195 205 218 / 78%) !important;
  color: #263b56 !important;
  background: linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(242 245 249 / 96%)) !important;
  box-shadow: 0 5px 14px rgb(24 38 56 / 10%) !important;
  text-shadow: none !important;
}

body.unni-ui :where(
  .button--primary,
  .primary-button,
  .approval-save,
  .auth-form button[type="submit"],
  .submit:not(.logout-button),
  button.primary
) {
  border-color: #36536f !important;
  color: #fff !important;
  background: var(--unni-action-gradient) !important;
  box-shadow: var(--unni-action-shadow) !important;
  text-shadow: none !important;
}

body.unni-client-dashboard .os-delivery-card .button,
body.unni-client-dashboard #panel-approvals .approval-save {
  color: #fff !important;
  background: var(--unni-action-gradient) !important;
  border-color: #36536f !important;
  box-shadow: var(--unni-action-shadow) !important;
}

body.unni-ui :where(
  .button,
  .secondary-button,
  .copy-button,
  .client-logout,
  .logout-button,
  .back,
  .unni-standard-back,
  .unni-standard-action,
  .open-button,
  .management-button,
  .button--primary,
  .primary-button,
  .approval-save,
  .auth-form button[type="submit"],
  .submit
):hover {
  border-color: rgb(129 149 171 / 88%) !important;
  filter: none !important;
  transform: translateY(-1px);
  box-shadow: var(--unni-action-shadow-hover) !important;
}

body.unni-ui :where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--unni-action-focus) !important;
  outline-offset: 2px !important;
}

body.unni-dashboard .filter-button {
  border-color: rgb(255 255 255 / 12%) !important;
  color: #cbc7d4 !important;
  background: rgb(255 255 255 / 4%) !important;
  box-shadow: none !important;
}

body.unni-dashboard .filter-button[aria-pressed="true"] {
  border-color: rgb(177 197 216 / 32%) !important;
  color: #f7f9fc !important;
  background: linear-gradient(135deg, rgb(73 96 121 / 86%), rgb(45 66 90 / 90%)) !important;
}

body.unni-client-dashboard #canais .channel-icon {
  overflow: hidden;
  box-shadow: 0 8px 18px rgb(20 33 49 / 15%);
}

body.unni-client-dashboard #canais .channel-icon svg {
  width: 25px;
  height: 25px;
}

body.unni-client-dashboard #canais .channel-icon--instagram {
  background: linear-gradient(145deg, #833ab4, #e1306c 58%, #fcb045);
}

body.unni-client-dashboard #canais .channel-icon--instagram :where(rect, circle) {
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
}

body.unni-client-dashboard #canais .channel-icon--instagram .channel-icon__dot {
  fill: #fff;
  stroke: none;
}

body.unni-client-dashboard #canais .channel-icon--facebook {
  background: #1877f2;
}

body.unni-client-dashboard #canais .channel-icon--facebook path,
body.unni-client-dashboard #canais .channel-icon--whatsapp path {
  fill: #fff;
}

body.unni-client-dashboard #canais .channel-icon--whatsapp {
  background: #25d366;
}

body.unni-ui :where(input[type="checkbox"], input[type="radio"]) {
  min-width: 20px;
  min-height: 20px;
  accent-color: #36536f;
}

@media (max-width: 760px) {
  body.unni-dashboard .filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body.unni-dashboard .filter-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding-inline: 8px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
  }

  body.unni-dashboard .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.unni-dashboard .summary-card {
    border: 0 !important;
    border-bottom: 1px solid var(--mobile-line, rgb(255 255 255 / 13%)) !important;
  }

  body.unni-dashboard .summary-card:nth-child(odd):not(:last-child) {
    border-right: 1px solid var(--mobile-line, rgb(255 255 255 / 13%)) !important;
  }

  body.unni-dashboard .summary-card:last-child {
    border-right: 0 !important;
    border-bottom: 0 !important;
  }

  body.unni-client-dashboard .unni-standard-topbar {
    display: grid !important;
    grid-template-columns: minmax(118px, 1fr) auto !important;
    grid-template-areas:
      "brand actions"
      "title title" !important;
    gap: 5px 8px !important;
    min-height: 0 !important;
    padding: 9px 10px !important;
    overflow: hidden;
  }

  body.unni-client-dashboard .unni-standard-brand {
    grid-area: brand;
    width: min(134px, 40vw) !important;
    min-width: 0;
  }

  body.unni-client-dashboard .unni-standard-title {
    grid-area: title;
    min-width: 0;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 3px 1px 1px !important;
    font-size: clamp(.88rem, 4.3vw, 1.05rem) !important;
    line-height: 1.16 !important;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  body.unni-client-dashboard .unni-standard-actions {
    grid-area: actions;
    gap: 5px !important;
    min-width: 0;
  }

  body.unni-client-dashboard .unni-standard-actions :where(.client-logout, .unni-pwa-install) {
    min-width: 42px !important;
    min-height: 42px !important;
    padding-inline: 10px !important;
  }

  body.unni-auth-layout .auth-topbar {
    min-height: 76px !important;
    padding: 10px 12px !important;
  }

  body.unni-auth-layout .auth-topbar .unni-standard-brand {
    width: min(146px, 48vw) !important;
  }

  body.unni-auth-layout .auth-card {
    padding: 24px 17px !important;
  }

  body.unni-auth-layout .auth-card :where(h1, h2) {
    font-size: clamp(2.15rem, 11.5vw, 3.15rem) !important;
  }
}

@media (max-width: 360px) {
  body.unni-client-dashboard .unni-standard-topbar {
    grid-template-columns: minmax(106px, 1fr) auto !important;
    padding-inline: 8px !important;
  }

  body.unni-client-dashboard .unni-standard-actions :where(.client-logout, .unni-pwa-install) {
    width: 40px !important;
    min-width: 40px !important;
    padding-inline: 0 !important;
    font-size: 0 !important;
  }
}

@media (max-height: 650px) and (max-width: 700px) {
  body.unni-auth-layout .auth-page {
    gap: 8px !important;
  }

  body.unni-auth-layout .auth-center {
    padding: 0 !important;
  }

  body.unni-auth-layout .auth-card {
    padding-block: 20px !important;
  }

  body.unni-auth-layout .auth-card :where(h1, h2) {
    font-size: 2.15rem !important;
  }

  body.unni-auth-layout .auth-form {
    margin-top: 14px !important;
  }
}

/*
 * V2.3.24 — botões neutros.
 * O degradê da marca permanece apenas nas faixas superiores dos cartões.
 */
body.unni-portal :where(
  .button,
  .primary-button,
  .secondary-button,
  .filter-button[aria-pressed="true"]
) {
  border: 1px solid #cfd4df !important;
  color: #11152f !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 8px 20px rgb(17 21 47 / 8%) !important;
}

body.unni-ui.unni-client-dashboard .os-delivery-card :where(.button,.button--primary),
body.unni-ui.unni-client-dashboard #panel-approvals .approval-save {
  border: 1px solid #cfd4df !important;
  color: #11152f !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 8px 20px rgb(17 21 47 / 8%) !important;
}

body.unni-client-dashboard :where(
  .button,
  .button--primary,
  .copy-button,
  .approval-save,
  .client-logout,
  .client-media-close,
  .client-media-actions a,
  .client-media-actions button
) {
  border: 1px solid #cfd4df !important;
  color: #11152f !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 8px 20px rgb(17 21 47 / 8%) !important;
}

body.unni-portal :where(.button,.primary-button,.secondary-button,.filter-button[aria-pressed="true"]):not(:disabled):hover,
body.unni-client-dashboard :where(.button,.button--primary,.copy-button,.approval-save,.client-logout,.client-media-close,.client-media-actions a,.client-media-actions button):not(:disabled):hover {
  border-color: #aeb7c8 !important;
  color: #11152f !important;
  background: #f1f2f5 !important;
  filter: none !important;
  transform: translateY(-1px);
}

body.unni-portal :where(.button,.primary-button,.secondary-button):disabled,
body.unni-client-dashboard :where(.button,.button--primary,.copy-button,.approval-save):disabled {
  color: #697187 !important;
  background: #e8eaf0 !important;
  box-shadow: none !important;
}
