/* ============================================================
   polish.css — Onda 4: refinamentos de UX
   Importado depois de theme.css + sidebar.css + dashboard.css
   ============================================================ */

/* ── 1) BREADCRUMB (página interna com hierarquia) ─────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--info);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.breadcrumb a:hover {
  color: var(--navy);
  text-decoration: underline;
}
.breadcrumb .breadcrumb-sep {
  color: var(--muted2);
  font-weight: 400;
}
.breadcrumb .breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* ── 2) SCROLL TO TOP BUTTON ──────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 32, 96, 0.25);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .15s;
  z-index: 90;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--navy2);
}
.scroll-top svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 600px) {
  .scroll-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* Esconder em modo print */
@media print {
  .scroll-top { display: none !important; }
}

/* ── 3) EMPTY STATE (busca/filtro vazio) ───────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  opacity: 0.4;
  color: var(--muted2);
}
.empty-state-icon svg { width: 100%; height: 100%; }
.empty-state-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.empty-state-msg {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}
.empty-state-msg strong {
  color: var(--text);
  font-weight: 600;
}

/* ── 4) SIDEBAR MOBILE — fade do backdrop ─────────────────── */
/* sidebar.css da Onda 1 já anima a sidebar via translateX.
   Aqui só adicionamos o fade no backdrop, que era display:none/block. */
@media (max-width: 900px) {
  .sidebar-backdrop {
    display: block !important;          /* sempre montado */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ── 5) ATALHO / NA SEARCH BAR (hint visual) ──────────────── */
.search-wrap {
  position: relative;
}
.search-wrap .kbd-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border-s);
  border-radius: 4px;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.search-wrap .fundo-search:focus ~ .kbd-hint,
.search-wrap:focus-within .kbd-hint {
  opacity: 0;
}

/* Esconder em telas muito pequenas */
@media (max-width: 480px) {
  .search-wrap .kbd-hint { display: none; }
}

/* ── 6) FADE-IN sutil ao carregar a página ────────────────── */
.main {
  animation: pageFadeIn 0.35s ease-out;
}
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduzir movimento se o usuário preferir */
@media (prefers-reduced-motion: reduce) {
  .main,
  .scroll-top,
  .sidebar,
  .sidebar-backdrop {
    animation: none !important;
    transition: none !important;
  }
}
