/* ========= Global tokens, reset, base, componentes ========= */
:root {
  /* Brand — laranja vivo que funciona no branco e no preto */
  --brand: #ff6a00;
  --brand-600: #e35f00;
  --brand-700: #c95500;
  --brand-50: #fff5ee;

  /* Monocromáticos */
  --ink: #111;
  /* texto principal */
  --muted: #6b7280;
  --line: #e5e7eb;

  /* Superfícies */
  --bg: #fff;
  --card: #fff;
  --elev: 0 8px 28px rgba(17, 17, 17, .06);

  /* Acessórios */
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;

  /* Forma */
  --radius: 14px;

  /* Header */
  --header-h: 56px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.app-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)),
    url("/img/background-brand.webp");
  background-repeat: repeat;
  background-position: center top;
  background-attachment: fixed;
  background-size: 150px auto;
}

/* Layout utilitário */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px
}

@media (max-width: 880px) {
  .grid-2 {
    grid-template-columns: 1fr
  }
}

/* Títulos */
.h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0
}

.h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0px
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--elev);
}

/* Botões */
.btn {
  --btn-bg: #111;
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  text-decoration: none;
  transition: transform .02s, filter .2s, background .2s;
}

.btn:active {
  transform: translateY(1px)
}

.btn-primary {
  --btn-bg: var(--brand);
  --btn-fg: #fff
}

.btn-primary:hover {
  filter: brightness(.95)
}

.btn-outline {
  --btn-bg: #fff;
  --btn-fg: var(--brand);
  --btn-bd: var(--brand)
}

.btn-outline:hover {
  background: var(--brand-50)
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line)
}

/* Botão “perigo” suave (para logout etc.) */
.btn-danger-soft {
  --btn-bg: #fee2e2;
  --btn-fg: #b91c1c;
  --btn-bd: #fecaca;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
}

.btn-danger-soft:hover {
  filter: brightness(.98)
}

/* Inputs */
.form {
  display: grid;
  gap: 16px
}

.form-row {
  display: grid;
  gap: 16px
}

.form-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

@media (max-width:880px) {
  .form-2 {
    grid-template-columns: 1fr
  }
}

.label {
  display: block;
  font-weight: 600;
  margin: 0 0 8px
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}

.textarea {
  min-height: 110px;
  resize: vertical
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, .14);
}

/* Switch (reutilizável) */
.switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 32px
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0
}

.switch .slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #cbd5e1;
  border-radius: 999px;
  transition: .2s;
}

.switch .slider:before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}

.switch input:checked+.slider {
  background: var(--brand)
}

.switch input:checked+.slider:before {
  transform: translateX(24px)
}

/* Chips/Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  user-select: none;
  font-size: .95rem;
}

.tag.is-selected {
  background: var(--brand-50);
  border-color: var(--brand);
}

/* Alert */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.alert--error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b
}

.alert--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #065f46
}

/* ========== Header com largura do conteúdo (inner container) ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .04);
}

/* Alinha com a largura do .layout (1200px + padding 16px) */
.site-header__inner {
  height: var(--header-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Marca/Logo clicável */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: .2px;
  text-decoration: none;
}

.logo-brand-nav {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand i {
  font-size: 18px;
}

.nav-logo-mobile {
  display: none;
}

.nav-logo-mobile .brand {
  width: 100%;
  justify-content: center;
}

.nav-logo-mobile .logo-brand-nav {
  height: 30px;
  width: auto;
}

/* Ações do header (ícones à direita) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botão icônico (apenas ícone) */
.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  transition: box-shadow .2s, transform .02s, border-color .2s;
}

.icon-btn:hover {
  border-color: #ffd4b8;
  box-shadow: var(--elev);
}

.icon-btn:active {
  transform: translateY(1px);
}

/* Badge no header (reaproveita sua classe, mas sem position:absolute global) */
.header-actions .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

.link-teste {
  color: #ef4444;
  font-weight: 700;
}

/* Badge (reutilizável) */
.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.page-header>.container {
  display: flex;
  align-items: center;
}

.page-wrap {
  padding: 0px
}

/* usado pelo profile e agora history */
.back-btn {
  gap: 8px
}

/* Utilitários */
.hidden {
  display: none !important
}

/* ====== Utilitários adicionais (auth + geral) ====== */
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px
}

.muted {
  color: var(--muted)
}

.link {
  color: var(--brand);
  text-decoration: none
}

.link:hover {
  filter: brightness(.9);
  text-decoration: underline
}

.link-muted {
  color: var(--muted);
  text-decoration: none
}

.link-muted:hover {
  color: var(--ink);
  text-decoration: underline
}

.text-center {
  text-align: center
}

.mt-12 {
  margin-top: 12px
}

.help {
  font-size: .88rem;
}

/* Campos inválidos + mensagem de campo */
.field-error {
  margin-top: 6px;
  color: var(--danger);
  font-size: .9rem;
  min-height: 1em
}

.input.is-invalid,
.select.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

/* Spinner padrão para qualquer botão com .loading */
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .6);
  border-top-color: #fff;
  display: none;
  animation: spin 1s linear infinite;
}

.btn.loading .spinner {
  display: inline-block
}

.btn.loading .btn-text {
  opacity: .8
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-body {
  padding: 16px
}

/* ====== Page Progress (global) ====== */
.page-progress {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity .25s ease;
}

.page-progress.is-visible {
  opacity: 1;
}

.page-progress__bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-600));
  box-shadow: 0 0 8px rgba(0, 0, 0, .12);
  transition: width .25s ease;
}

/* ====== Snackbar (global) ====== */
.snackbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(68px + 12px + env(safe-area-inset-bottom, 0px));
  /* 68px = actionbar padrão */
  background: #111827;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .28);
  z-index: 1040;
}

.snackbar[hidden] {
  display: none;
}

.snackbar--error {
  background: #b91c1c;
}

/* ============== Loading Overlay (boot) ============== */
.boot-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fff;
  z-index: 10000;
  opacity: 1;
  transition: opacity .28s ease;
}

.boot-overlay.is-out {
  opacity: 0;
  pointer-events: none;
}

.boot-box {
  width: min(420px, 86vw);
  display: grid;
  gap: 16px;
  text-align: center;
}

.boot-logo {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: #0f172a;
}

.boot-logo i {
  color: var(--brand);
}

.boot-bar {
  height: 8px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
  border: 1px solid var(--line);
}

.boot-bar #bootFill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-600));
  transition: width .25s ease;
}

.boot-tip {
  color: #475569;
  font-size: .95rem;
}

/* bloqueia scroll e oculta conteúdo durante o boot */
body.booting {
  overflow: hidden;
}

body.booting>*:not(#bootOverlay) {
  visibility: hidden !important;
}

body:not(.booting)>* {
  visibility: visible;
}

/* ====== Lightbox: nav embaixo ====== */
.imglightbox__dialog {
  position: relative;
  display: inline-grid;
  grid-template-rows: auto auto;
  /* imagem + controles */
  justify-items: center;
  gap: 10px;
  max-width: 96vw;
  max-height: 90vh;
}

.imglightbox__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.imglightbox__img {
  max-width: 96vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  transition: transform .18s ease;
}

/* barra de controles (embaixo da imagem) */
.imglightbox__controls {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* botões: fundo branco + ícone laranja; sem seleção */
.imglightbox__nav {
  position: static;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.imglightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.imglightbox.is-open {
  display: grid;
  place-items: center;
}

/* backdrop: overlay branco translúcido */
.imglightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .9);
  opacity: 0;
  transition: opacity .18s ease;
}

.imglightbox.is-open .imglightbox__backdrop {
  opacity: 1;
}

.imglightbox__nav:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 106, 0, .18);
}

.imglightbox__nav i {
  pointer-events: none;
  font-size: 18px;
  line-height: 1;
}

/* botão fechar */
.imglightbox__close {
  position: absolute;
  top: -42px;
  right: -6px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.imglightbox__close i {
  pointer-events: none;
  font-size: 18px;
  line-height: 1;
}

.imglightbox__close:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 122, 0, .25);
}

/* remover offsets antigos das setas */
.imglightbox__prev,
.imglightbox__next {
  left: auto;
  right: auto;
}

/* ==========================================================================
   Layout principal (era do index.css, agora global)
   ========================================================================== */
.layout {
  max-width: 1200px;
  margin: calc(var(--header-h) + 10px) auto 5px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}

.content {
  min-width: 0
}

/* ==========================================================================
   Sidebar (desktop sticky) + Navlist + Botões
   ========================================================================== */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 14px);
  align-self: start
}

.navlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.navbtn {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.navbtn i {
  width: 20px;
  text-align: center;
  color: var(--brand)
}

.navbtn:hover {
  border-color: #d7dce3;
  box-shadow: var(--elev);
  transform: translateY(-1px)
}

.navbtn:active {
  transform: none
}

.navbtn.is-active {
  border-color: var(--brand);
}

/* ==========================================================================
   Mobile Topbar (LEGADO — agora oculto)
   ========================================================================== */
.mobile-topbar {
  display: none !important;
}

/* Toggle (hamburger) — base (desktop: escondido) */
.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--elev);
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle i {
  color: var(--brand);
  font-size: 18px;
  line-height: 1;
}

.mobile-nav-toggle[aria-expanded="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, .12);
}

/* ==========================================================================
   NOTIFICAÇÕES
   ========================================================================== */
.notif-panel {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 16px;
  width: min(460px, 92vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  padding: 12px;
  z-index: 80;

  max-height: 70vh;
  overflow: auto;

  /* Scrollbar Firefox */
  scrollbar-color: #cccccc #f0f0f0;
  scrollbar-width: thin;
}

/* Scrollbar WebKit */
.notif-panel::-webkit-scrollbar {
  width: 8px;
}

.notif-panel::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.notif-panel::-webkit-scrollbar-thumb {
  background-color: #cccccc;
  border-radius: 10px;
  border: 2px solid #ffffff;
}

.notif-panel::-webkit-scrollbar-thumb:hover {
  background-color: #b0b0b0;
}

.header-actions {
  position: relative;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 10px;
  border-bottom: 1px solid var(--line);
}

.notif-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .2px;
}

.icon-btn.sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.notif-sect {
  padding: 10px 6px;
}

.notif-sect+.notif-sect {
  border-top: 1px dashed var(--line);
}

.sidebar .badge {
  display: none !important;
}

/* Título das seções de notificação com contador à direita */
.notif-sect__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 5px;
}

.notif-sect__title .row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-index .mobile-back {
  display: none !important;
}

.notif-item__main {
  cursor: pointer;
}

/* Pílula de contagem "inline" (dentro do painel) */
.notif-pill {
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  color: #fff;
  background: #ef4444;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.notif-sect__title i {
  color: var(--brand);
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.notif-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.notif-item:hover {
  border-color: #d7dce3;
  box-shadow: var(--elev);
}

.notif-item__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notif-item__title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item__desc {
  font-size: .92rem;
  color: var(--muted);
  overflow: hidden;
}

.notif-item__meta {
  font-size: .7rem;
  color: #475569;
  text-align: right;
}

.notif-empty {
  color: var(--muted);
  padding: 8px 10px;
}

.notif-foot {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

/* === NOTIFICATIONS: enforce single global badge (hide per-category) === */
.notif-sect__title .badge {
  display: none !important;
}

.notif-pill {
  display: none !important;
}

/* keep scroll for long lists */
.notif-panel {
  max-height: 70vh;
  overflow: auto;
}

/* botão "carregar mais" */
.notif-more {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 10px 12px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}

.notif-more:hover {
  background: rgba(0, 0, 0, .04);
}

.notif-more:active {
  transform: translateY(1px);
}

.notif-more:disabled {
  opacity: .6;
  cursor: default;
}

/* ===== Overlay de aviso invisível ===== */
.invisible-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 15, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.invisible-box {
  max-width: 420px;
  background: #151826;
  color: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.invisible-box h2 {
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.invisible-box p+p {
  margin-top: 8px;
}

@media (max-width: 960px) {

  .site-header__inner {
    padding: 0 16px;
  }

  .site-header .brand {
    display: none;
  }

  /* mostra o logo dentro do menu lateral */
  .nav-logo-mobile {
    display: flex;
    justify-content: start;
    padding: 10px 8px 14px;
    margin: 0 0 6px;
    border-bottom: 1px solid var(--line);
  }

  .nav-logo-mobile .brand {
    display: flex;
    justify-content: start;
  }

  .nav-logo-mobile .logo-brand-nav {
    height: 32px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    position: static;
    margin: 0;
  }

  /* grid vira 1 coluna e a sidebar deixa de ser sticky */
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
  }

  /* Sidebar como overlay */
  .sidebar {
    top: calc(var(--header-h) + 10px);
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .24s ease, transform .24s ease;
    z-index: 60;
  }

  /* Backdrop atrás do painel */
  .sidebar::before {
    content: "";
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(0, 0, 0, .08);
    opacity: 0;
    transition: opacity .24s ease;
    pointer-events: none;
    z-index: 0;
  }

  /* Painel com os botões */
  .sidebar .navlist {
    position: relative;
    z-index: 1;
    margin: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--elev);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* Estado aberto */
  .sidebar.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .sidebar.is-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  /* Notificações adaptadas ao mobile */
  .notif-panel {
    position: fixed;
    top: calc(var(--header-h) + 6px);
    right: 8px;
    left: 8px;
    width: auto;
    max-height: 70vh;
    overflow: auto;
    border-radius: 16px;
  }

  .notif-item {
    display: block;
  }

  .notif-item__meta {
    text-align: left;
  }

  /* Header actions e botão voltar no mobile */
  .header-actions {
    gap: 8px;
  }

  .header-actions .mobile-back {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: .9rem;
  }
}

/* Desktop: esconde mobile-back dentro do header-actions */
@media (min-width: 961px) {
  .header-actions .mobile-back {
    display: none;
  }
}

/* ==========================================================================
   Responsivo extra (componentes listagens/rooms, se precisar depois)
   ========================================================================== */
@media (max-width: 520px) {
  .rooms-list {
    padding: 12px
  }

  .rooms-list li {
    flex-direction: column;
    align-items: flex-start
  }

  .join-btn {
    width: 100%
  }
}

/* ====== Toast flutuante (bottom right / mobile central) ====== */
.toast-stack{
  position: fixed;
  right: 16px;
  bottom: calc(var(--actionbar-h, 0px) + 16px + var(--safe-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  align-items: flex-end;
  pointer-events: none; /* só os toasts recebem clique */
}

.toast{
  min-width: 260px;
  max-width: min(360px, 90vw);
  background: #111827;
  color: #f9fafb;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 18px 36px rgba(0,0,0,.28);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  pointer-events: auto;
  font-size: .92rem;
  animation: toast-in .25s ease-out;
}

.toast--error{ background:#b91c1c; }
.toast--success{ background:#059669; }

.toast__msg{
  flex: 1;
  white-space: pre-line; /* <- IMPORTANTE pro showList */
}

.toast__close{
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  padding: 0;
  margin-left: 4px;
  font-size: 1rem;
  line-height: 1;
  opacity: .8;
}
.toast__close:hover{
  opacity: 1;
}

@keyframes toast-in{
  from{ opacity:0; transform: translateY(8px) scale(.98); }
  to{   opacity:1; transform: translateY(0)   scale(1); }
}
@keyframes toast-out{
  from{ opacity:1; transform: translateY(0)   scale(1); }
  to{   opacity:0; transform: translateY(4px) scale(.98); }
}

.toast.is-hiding{
  animation: toast-out .18s ease-in forwards;
}

@media (max-width: 640px){
  .toast-stack{
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
  }
}