  /* Add-to-Homescreen: overlay fixo por cima de tudo (intrusivo) */
  .adhs-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    z-index: 99999 !important;
  }
  /* ========== Site (não-login): bolinhas 40% sup.esq. → 5% inf.dir.; camada 400% para telas muito largas ========== */
  body:not(.login-page) #app::before {
    content: '' !important;
    position: fixed !important;
    left: -150% !important;
    top: -150% !important;
    width: 400% !important;
    height: 400% !important;
    z-index: 0 !important;
    pointer-events: none !important;
    background-image: radial-gradient(rgba(255, 255, 255, 0.085) 9px, transparent 9px) !important;
    background-size: 36px 36px !important;
    background-repeat: repeat !important;
    background-position: 0 0 !important;
    transform: rotate(-20deg) !important;
    mask-image: linear-gradient(to bottom right, black 0%, rgba(0, 0, 0, 0.5) 18%, rgba(0, 0, 0, 0.06) 45%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to bottom right, black 0%, rgba(0, 0, 0, 0.5) 18%, rgba(0, 0, 0, 0.06) 45%, transparent 100%) !important;
    mask-size: 100% 100% !important;
    -webkit-mask-size: 100% 100% !important;
  }
  body:not(.login-page).theme-light #app::before {
    background-image: radial-gradient(rgba(0, 0, 0, 0.085) 9px, transparent 9px) !important;
  }
  body:not(.login-page) #app > * {
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
  }
  /* Garantir que o layout e o main não tapam as bolinhas (podem ter background em outros CSS) */
  body:not(.login-page) #app .app-with-bottom-nav,
  body:not(.login-page) #app .app-with-bottom-nav #mainContent {
    background: transparent !important;
  }
  /* Login page — como no print (tema escuro) */
  html { overflow-x: hidden; max-width: 100%; box-sizing: border-box; }
  html *, html *::before, html *::after { box-sizing: inherit; }
  body.login-page {
    min-height: 100vh;
    margin: 0;
    max-width: 100vw;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif);
  }
  /* Fundo: 1) cor no body  2) bolinhas DENTRO do #app (como antes de mudar ordem de layers) */
  body.login-page::before,
  body.login-page::after {
    display: none !important;
    content: none !important;
    background: none !important;
  }
  body.login-page {
    position: relative;
    background-color: #23242b !important;
  }
  body.login-page.theme-dark {
    background-color: #23242b;
  }
  body.login-page.theme-light {
    background-color: #f7f7f7 !important;
  }
  body.login-page > *:not(.login-theme-btn) {
    position: relative;
    z-index: 1;
  }
  /* #app na login: overflow visible para não cortar ::before; bolinhas em #app::before */
  body.login-page #app {
    position: relative !important;
    overflow: visible !important;
    background: transparent !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  body.login-page #app::before {
    content: '' !important;
    position: fixed !important;
    left: -150% !important;
    top: -150% !important;
    width: 400% !important;
    height: 400% !important;
    z-index: 0 !important;
    pointer-events: none !important;
    background-image: radial-gradient(rgba(255, 255, 255, 0.085) 9px, transparent 9px) !important;
    background-size: 36px 36px !important;
    background-repeat: repeat !important;
    background-position: 0 0 !important;
    transform: rotate(-20deg) !important;
    mask-image: linear-gradient(to bottom right, black 0%, rgba(0, 0, 0, 0.5) 18%, rgba(0, 0, 0, 0.06) 45%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to bottom right, black 0%, rgba(0, 0, 0, 0.5) 18%, rgba(0, 0, 0, 0.06) 45%, transparent 100%) !important;
    mask-size: 100% 100% !important;
    -webkit-mask-size: 100% 100% !important;
  }
  body.login-page.theme-light #app::before {
    background-image: radial-gradient(rgba(0, 0, 0, 0.085) 9px, transparent 9px) !important;
  }
  body.login-page #app > *:not(.login-theme-btn) {
    position: relative !important;
    z-index: 1 !important;
  }
  .login-mobile-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  /* Mobile: sem scroll — conteúdo 10% menor com scale(0.9) */
  @media (max-width: 480px) {
    html.login-page-html {
      height: 100dvh;
      overflow: hidden;
      overflow-x: hidden;
    }
    .login-mobile-wrap {
      transform: scale(0.9);
      transform-origin: top center;
      flex-shrink: 0;
    }
    body.login-page {
      height: 100dvh;
      max-height: 100dvh;
      min-height: 100dvh;
      overflow: hidden;
      overflow-x: hidden;
      padding: 0;
      box-sizing: border-box;
    }
    /* Botão de tema: canto superior direito */
    .login-theme-btn {
      top: max(5px, env(safe-area-inset-top, 5px));
      right: max(5px, env(safe-area-inset-right, 5px));
      left: auto;
      padding: 3px;
    }
    .login-theme-btn img {
      width: 16px;
      height: 16px;
    }
    /* Logo desce um pouco mais no mobile + logo menor (caber sem scroll) */
    .login-logo-wrap {
      margin-top: min(5.5vh, 32px);
      margin-bottom: min(1.8vh, 9px);
      max-width: 100%;
      flex-shrink: 0;
    }
    .login-logo-baixo,
    .login-logo-cima {
      max-width: 23px;
    }
    .login-logo-cima {
      animation-name: logoCimaDropMobile;
    }
    /* Card mais compacto (caber sem scroll) */
    .login-card {
      padding: 5px 9px 7px;
      border-radius: 9px;
      width: 100%;
      max-width: calc(100vw - 14px);
      box-sizing: border-box;
      flex-shrink: 0;
    }
    .login-card-header h1 {
      font-size: 12px;
    }
    .login-card-header .help-icon img {
      width: 12px;
      height: 12px;
    }
    .login-divider {
      margin: 4px 0 4px;
    }
    .login-field {
      margin-bottom: 3px;
    }
    .login-field .icon-left img,
    .login-field .icon-right img {
      width: 12px;
      height: 12px;
    }
    .login-field input {
      padding: 4px 24px 4px 24px;
      font-size: 11px;
    }
    .login-remember {
      margin-top: 0;
      margin-bottom: 3px;
      font-size: 9px;
    }
    .login-remember input[type="checkbox"] {
      width: 10px;
      height: 10px;
    }
    .login-btn {
      margin-top: 3px;
      padding: 4px 9px;
      font-size: 11px;
    }
    .login-card-footer {
      margin-top: 3px;
    }
    .login-ajuda-icon {
      width: 10px;
      height: 10px;
    }
    .login-card-footer .login-footer-ajuda {
      font-size: 9px;
    }
    /* Espaço embaixo do footer (sem scroll) */
    .login-page-footer {
      margin-top: min(1.8vh, 9px);
      margin-bottom: 0;
      padding-bottom: max(env(safe-area-inset-bottom, 0), min(1.35vh, 7px));
      font-size: 7px;
      flex-shrink: 0;
    }
    .login-page-footer-version {
      font-size: 6px;
    }
    .login-error {
      padding: 5px 7px;
      font-size: 10px;
      margin-bottom: 4px;
    }
    body.login-page #app {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      min-height: 0 !important;
      height: auto !important;
      overflow: hidden;
      padding: min(2.7vh, 14px) 7px;
      box-sizing: border-box;
      justify-content: center;
    }
  }
  /* Telas muito baixas: ainda mais compacto para caber sem scroll */
  @media (max-width: 480px) and (max-height: 600px) {
    body.login-page #app {
      padding: min(1.8vh, 9px) 6px;
    }
    .login-logo-wrap {
      margin-top: min(0.9vh, 5px);
      margin-bottom: min(1.35vh, 7px);
    }
    .login-logo-baixo,
    .login-logo-cima {
      max-width: 20px;
    }
    .login-card {
      padding: 4px 7px 5px;
    }
    .login-card-header h1 { font-size: 11px; }
    .login-divider { margin: 3px 0 4px; }
    .login-field { margin-bottom: 3px; }
    .login-field input { padding: 3px 22px; font-size: 10px; }
    .login-remember { margin-bottom: 3px; font-size: 8px; }
    .login-remember input[type="checkbox"] { width: 9px; height: 9px; }
    .login-btn { margin-top: 3px; padding: 4px 7px; font-size: 10px; }
    .login-card-footer { margin-top: 3px; }
    .login-page-footer {
      margin-top: min(1.35vh, 7px);
      padding-bottom: max(env(safe-area-inset-bottom, 0), min(0.9vh, 5px));
    }
  }
  .login-logo-wrap {
    margin-bottom: 70px;
  }
  .login-card {
    width: 100%;
    max-width: min(420px, calc(100vw - 32px));
    padding: 32px 28px 59px;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    box-sizing: border-box;
  }
  body.login-page.theme-dark .login-card {
    background: #262A35;
  }
  body.login-page.theme-light .login-card {
    background: #e2e8f0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border: 1px solid #cbd5e1;
  }
  .login-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
  }
  .login-divider {
    height: 2px;
    margin: 24px 0 43px;
    border: none;
    border-radius: 1px;
  }
  body.login-page.theme-dark .login-divider {
    background: #404657;
  }
  body.login-page.theme-light .login-divider {
    background: #94a3b8;
  }
  .login-card-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
  }
  body.login-page.theme-light .login-card-header h1 {
    color: #111827;
  }
  .login-card-header .help-icon {
    width: 22px;
    height: 22px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    background: transparent;
  }
  .login-card-header .help-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.9;
  }
  body.login-page.theme-light .login-card-header .help-icon img {
    opacity: 0.85;
    filter: brightness(0.4);
  }
  .login-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
  }
  .login-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.35;
    min-width: 200px;
    max-width: 380px;
    text-align: center;
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .login-tooltip-trigger:hover .login-tooltip {
    opacity: 1;
    visibility: visible;
  }
  body.login-page.theme-dark .login-tooltip {
    background: #262A35;
    color: #f1f0f4;
    border: 1px solid #404657;
  }
  body.login-page.theme-light .login-tooltip {
    background: #e2e8f0;
    color: #111827;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }
  .login-card-footer .login-tooltip {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 10px;
  }
  .login-field {
    position: relative;
    margin-bottom: 16px;
  }
  .login-field .icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .login-field .icon-left img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.85;
  }
  body.login-page.theme-light .login-field .icon-left img {
    filter: brightness(0.2);
  }
  .login-field .icon-right {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .login-field .icon-right img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.85;
  }
  body.login-page.theme-light .login-field .icon-right img {
    filter: brightness(0.35);
  }
  .login-field input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    border-radius: 12px;
    border: none !important;
    font-size: 15px;
    box-sizing: border-box;
  }
  body.login-page.theme-dark .login-field input {
    background-color: #2E3240 !important;
    background: #2E3240 !important;
    color: #f1f0f4;
  }
  body.login-page.theme-dark .login-field input::placeholder {
    color: #a8a4b8;
  }
  /* Navegador autofill costuma forçar fundo claro; forçar #2E3240 no dark */
  body.login-page.theme-dark .login-field input:-webkit-autofill,
  body.login-page.theme-dark .login-field input:-webkit-autofill:hover,
  body.login-page.theme-dark .login-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f1f0f4;
    -webkit-box-shadow: 0 0 0 1000px #2E3240 inset !important;
    box-shadow: 0 0 0 1000px #2E3240 inset !important;
    transition: background-color 5000s ease-in-out 0s;
  }
  body.login-page.theme-light .login-field input {
    background-color: #f1f5f9 !important;
    background: #f1f5f9 !important;
    color: #111827;
    border: none;
  }
  body.login-page.theme-light .login-field input::placeholder {
    color: #64748b;
  }
  body.login-page.theme-light .login-field input:-webkit-autofill,
  body.login-page.theme-light .login-field input:-webkit-autofill:hover,
  body.login-page.theme-light .login-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #111827;
    -webkit-box-shadow: 0 0 0 1000px #f1f5f9 inset !important;
    box-shadow: 0 0 0 1000px #f1f5f9 inset !important;
    transition: background-color 5000s ease-in-out 0s;
  }
  .login-field input:focus {
    outline: none;
  }
  body.login-page.theme-dark .login-field input:focus {
    box-shadow: 0 0 0 2px rgba(108, 93, 211, 0.4);
  }
  body.login-page.theme-light .login-field input:focus {
    box-shadow: 0 0 0 2px rgba(108, 93, 211, 0.25);
  }
  .login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 28px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
  }
  body.login-page.theme-light .login-remember {
    color: #475569;
  }
  .login-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 4px;
    flex-shrink: 0;
  }
  body.login-page.theme-dark .login-remember input[type="checkbox"] {
    background: #2E3240;
    border: 2px solid #404657;
  }
  body.login-page.theme-dark .login-remember input[type="checkbox"]:checked {
    background: #6C5DD3;
    border-color: #6C5DD3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");
    background-size: 10px 8px;
    background-position: center;
    background-repeat: no-repeat;
  }
  body.login-page.theme-light .login-remember input[type="checkbox"] {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
  }
  body.login-page.theme-light .login-remember input[type="checkbox"]:checked {
    background: #6C5DD3;
    border-color: #6C5DD3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");
    background-size: 10px 8px;
    background-position: center;
    background-repeat: no-repeat;
  }
  .login-btn {
    width: 100%;
    padding: 14px 16px;
    margin-top: 20px;
    border: none;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }
  .login-btn:hover {
    opacity: 0.95;
  }
  .login-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
  }
  .login-card-footer a,
  .login-card-footer .login-footer-ajuda {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  body.login-page.theme-light .login-card-footer a,
  body.login-page.theme-light .login-card-footer .login-footer-ajuda {
    color: #64748b;
  }
  .login-card-footer a:hover,
  .login-card-footer .login-footer-ajuda:hover {
    text-decoration: underline;
  }
  .login-ajuda-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.9;
  }
  body.login-page.theme-light .login-ajuda-icon {
    opacity: 0.85;
    filter: brightness(0.4);
  }
  .login-page-footer {
    margin-top: 32px;
    padding: 0 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
  }
  body.login-page.theme-light .login-page-footer {
    color: rgba(0, 0, 0, 0.35);
  }
  .login-page-footer a {
    color: inherit;
    text-decoration: underline;
  }
  .login-page-footer a:hover {
    text-decoration: underline;
    opacity: 0.9;
  }
  .login-page-footer-version {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    opacity: 0.8;
  }
  .login-error {
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
    font-size: 14px;
  }
  .login-theme-btn {
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 12px));
    right: max(12px, env(safe-area-inset-right, 12px));
    z-index: 100;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .login-theme-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
  }
  body.login-page.theme-light .login-theme-btn {
    border-color: #e2e8f0;
    background: #fff;
  }
  body.login-page.theme-light .login-theme-btn img {
    filter: brightness(0.4);
  }
  .login-logo-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .login-logo-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .login-logo-baixo {
    display: block;
    max-width: 110px;
    height: auto;
    transform-origin: center bottom;
    animation: logoBaixoSquash 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }
  .login-logo-cima {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    max-width: 110px;
    height: auto;
    transform-origin: center bottom;
    animation: logoCimaDrop 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }
  @keyframes logoCimaDrop {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    22% { transform: translateX(-50%) translateY(-26px); }
    32% { transform: translateX(-50%) translateY(-26px); }
    42%, 100% { transform: translateX(-50%) translateY(0); }
  }
  @keyframes logoCimaDropMobile {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    22% { transform: translateX(-50%) translateY(-8px); }
    32% { transform: translateX(-50%) translateY(-8px); }
    42%, 100% { transform: translateX(-50%) translateY(0); }
  }
  @keyframes logoBaixoSquash {
    0%, 42%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.96); }
    58% { transform: scaleY(1); }