/* AgendaFlow: cabeçalho e etapas compactas APENAS no PWA instalado de celular.
   Não altera o desktop, o navegador comum ou os fluxos de agendamento. */
.af-pwa-step-summary,
.af-pwa-step-current { display: none !important; }

@media (max-width: 900px) {
  body.af-pwa-compact-steps .app-shell .sidebar {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    gap: 0 !important;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 17px !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(214,179,106,.20);
    background: linear-gradient(158deg, #10243a 0%, #0e1824 48%, #0a0d12 100%);
  }

  body.af-pwa-compact-steps .app-shell .sidebar .brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    margin: 0 0 14px !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid rgba(255,255,255,.085);
  }

  body.af-pwa-compact-steps .app-shell .sidebar .brand-mark {
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    border-radius: 12px;
    font-size: 23px;
  }

  body.af-pwa-compact-steps .app-shell .sidebar .brand > div:last-child {
    min-width: 0;
  }

  body.af-pwa-compact-steps .app-shell .sidebar .brand strong {
    font-size: 17px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  body.af-pwa-compact-steps .app-shell .sidebar .brand span:not(.brand-mark) {
    font-size: 12px;
    line-height: 1.3;
    margin-top: 3px;
  }

  body.af-pwa-compact-steps .af-pwa-step-summary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 1px 7px;
  }

  body.af-pwa-compact-steps .af-pwa-step-summary > span:first-child {
    color: rgba(239,242,247,.65);
    letter-spacing: .11em;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 800;
  }

  body.af-pwa-compact-steps .af-pwa-step-count {
    padding: 5px 9px;
    border: 1px solid rgba(214,179,106,.25);
    border-radius: 999px;
    color: var(--accent-2, #f4d796);
    background: rgba(214,179,106,.075);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  body.af-pwa-compact-steps .app-shell #stepsNav {
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0,1fr)) !important;
    align-items: center;
    gap: 0 !important;
    margin: 0;
    padding: 5px 0;
    background: transparent;
  }

  body.af-pwa-compact-steps .app-shell #stepsNav::before {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    top: 27px;
    height: 2px;
    border-radius: 999px;
    background: rgba(143,160,177,.27);
    pointer-events: none;
  }

  body.af-pwa-compact-steps .app-shell #stepsNav .step {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 3px 0 !important;
    border: 0 !important;
    border-radius: 12px;
    color: var(--muted, #9ca6b5);
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0 !important; /* mantém somente os números visíveis */
    transform: none;
  }

  body.af-pwa-compact-steps .app-shell #stepsNav .step span {
    display: grid;
    place-items: center;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    padding: 0;
    border: 1px solid #415065;
    border-radius: 50%;
    background: #111b27;
    color: #aeb9c6;
    font-size: 13px !important;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 3px #0d1722;
    transition: color .15s, border-color .15s, background-color .15s;
  }

  body.af-pwa-compact-steps .app-shell #stepsNav .step.af-pwa-step-done span {
    border-color: rgba(214,179,106,.48);
    background: #302a20;
    color: #f4d796;
  }

  body.af-pwa-compact-steps .app-shell #stepsNav .step.active span {
    border-color: var(--accent, #d6b36a);
    background: var(--accent, #d6b36a);
    color: #10151b;
    box-shadow: 0 0 0 4px rgba(214,179,106,.16);
    font-size: 15px !important;
  }

  body.af-pwa-compact-steps .app-shell #stepsNav .step:focus-visible {
    outline: 2px solid var(--accent, #d6b36a);
    outline-offset: 1px;
  }

  body.af-pwa-compact-steps .af-pwa-step-current {
    display: flex !important;
    align-items: center;
    gap: 7px;
    min-height: 19px;
    margin: 7px 1px 0;
    font-size: 13px;
    font-weight: 650;
    color: #dce3eb;
  }

  body.af-pwa-compact-steps .af-pwa-step-current::before {
    content: '';
    display: block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent, #d6b36a);
  }

  body.af-pwa-compact-steps .app-shell .sidebar-card { display: none !important; }
}

@media (max-width: 370px) {
  body.af-pwa-compact-steps .app-shell .sidebar { padding-right: 12px !important; padding-left: 12px !important; }
  body.af-pwa-compact-steps .app-shell #stepsNav .step span { flex-basis: 32px; width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  body.af-pwa-compact-steps .app-shell #stepsNav .step span { transition: none; }
}
