/* ==========================================================================
   Base e Reset Global
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Só o shell do aplicativo trava a rolagem e o arrastar de texto. Páginas de
   documento (privacidade, termos, contas) precisam rolar e permitir seleção. */
body.app {
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Scrollbars personalizadas estilo Explorer / macOS */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink-faint);
  border: 2px solid transparent;
  background-clip: padding-box;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* O atributo hidden precisa vencer qualquer display de componente.
   Sem esta regra, um `display:flex` de autor (como o de .novo-menu) derrota
   o `[hidden]{display:none}` da folha do navegador -- que nao tem !important
   -- e o elemento fica permanentemente visivel. Foi exatamente o que fazia o
   menu "+ Novo" nascer aberto por cima da lista de buckets. */
/* Botão de ação. Vive aqui, e não no cabeçalho, porque as páginas fora do
   painel (entrar, contas, termos) usam o mesmo — uma definição só. */
.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-mid);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
  transition: all 0.12s;
}
.hbtn:hover {
  background: var(--hover);
  color: var(--ink);
  border-color: var(--line-strong);
}
.hbtn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-inverted);
}
.hbtn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

[hidden] {
  display: none !important;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
