/* Estrutura das telas: menu lateral + area de conteudo */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: var(--sp-5) var(--sp-4);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar .logo {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--sp-5);
  padding: 0 var(--sp-3);
}

.sidebar .nav-item {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  margin-bottom: var(--sp-1);
}
.sidebar .nav-item:hover { background: var(--surface); color: var(--text); }
.sidebar .nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

.content {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
}

/* Coluna central do conteudo (mensagens + cartao) */
.coluna { width: 100%; max-width: 1100px; display: flex; flex-direction: column; align-items: center; }
.coluna > .flash { width: 100%; max-width: 440px; margin: 0 0 var(--sp-4); }
.coluna-estreita { max-width: 440px; }

/* Telas sem menu (login, troca obrigatoria de senha) */
.page-centro { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--sp-5); }
.marca { font-size: var(--fs-xl); font-weight: 700; color: var(--accent); margin-bottom: var(--sp-5); text-align: center; }

/* Grupo e usuario no menu lateral */
.nav-grupo { margin: var(--sp-5) var(--sp-3) var(--sp-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
.sidebar-usuario { margin-top: auto; padding-top: var(--sp-4); border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.usuario-nome { font-weight: 600; word-break: break-word; }
.usuario-info { color: var(--text-dim); font-size: var(--fs-xs); margin-bottom: var(--sp-3); word-break: break-word; }
.usuario-acoes { display: flex; justify-content: space-between; align-items: center; }
.usuario-acoes form { display: inline; }

/* Celular / janela estreita: menu vira uma barra no topo */
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
  }
  .sidebar .logo { margin: 0; }
  .sidebar nav { display: flex; gap: var(--sp-2); }
  .sidebar .nav-item { margin: 0; }
  .nav-grupo { display: none; }
  .sidebar { flex-wrap: wrap; }
  .sidebar-usuario { margin: 0 0 0 auto; padding: 0; border: none; }
  .usuario-info { display: none; }
  .usuario-acoes { gap: var(--sp-3); }
  .app-shell { flex-direction: column; }
  .main { margin-left: 0; }
  .content { min-height: auto; align-items: flex-start; }
}
