@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap");
@import "./tokens.css";

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

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

body {
  background: var(--color-background);
  color: var(--color-on-background);
  font-family: var(--font-family-base);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input,
select {
  font-family: inherit;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none;
}

/* Escala tipográfica — DESIGN.md §Typography. Valores tabulares (tnum) para
   que colunas de moeda alinhem corretamente. */
.text-display-currency {
  font-size: 40px;
  font-weight: 700;
  line-height: 48px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.text-headline-lg {
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.01em;
}

@media (max-width: 600px) {
  .text-headline-lg {
    font-size: 24px;
    line-height: 32px;
  }
}

.text-headline-md {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.text-headline-sm {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.text-body-lg {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.text-body-md {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.text-label-md {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
}

.text-numeric-data {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

/* Scrollbar fina, como nos mockups */
.scroll-thin::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.scroll-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-thin::-webkit-scrollbar-thumb {
  background: var(--color-outline-variant);
  border-radius: var(--radius-full);
}

/* App shell — app-toolbar fixa no topo (full-width), abaixo dela nav-rail
   fixa no desktop / bottom nav no mobile (RNF-09, §5.2 do PRD) */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-shell__corpo {
  display: grid;
  grid-template-columns: auto 1fr;
  flex: 1;
}

@media (max-width: 1024px) {
  .app-shell__corpo {
    grid-template-columns: 1fr;
    padding-bottom: 64px; /* espaço para a bottom nav fixa */
  }
}

.app-shell__main {
  padding: var(--space-margin-mobile);
  min-width: 0;
}

@media (min-width: 1024px) {
  .app-shell__main {
    padding: var(--space-margin-desktop);
  }
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
