/* Component classes in plain CSS so Tailwind CDN doesn't need to @apply custom tokens */
html, body { touch-action: manipulation; }

.press:active { transform: translateY(2px); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.25rem;
  min-height: 52px;
  border-radius: 18px;
  color: #fff;
  background: #58cc02;
  border: none;
  border-bottom: 4px solid #378200;
  transition: transform 0.08s ease;
  user-select: none;
  cursor: pointer;
  text-decoration: none;
}
.btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
.btn-lg {
  font-size: 1.125rem;
  padding: 1rem 1.5rem;
  min-height: 60px;
}
.btn-sky   { background: #1cb0f6; border-bottom-color: #0e7bb5; }
.btn-sun   { background: #ffc800; color: #2b2d33; border-bottom-color: #c99a00; }
.btn-fire  { background: #ff4b4b; border-bottom-color: #b53232; }
.btn-ghost {
  background: #fff;
  color: #2b2d33;
  border: 2px solid rgba(0,0,0,0.08);
  border-bottom: 4px solid rgba(0,0,0,0.12);
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: 18px;
  border: 2px solid rgba(0,0,0,0.05);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  padding: 1rem;
}

/* --- Chips --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(0,0,0,0.05);
  color: #2b2d33;
}
.chip-A { background: rgba(28,176,246,0.15); color: #0e7bb5; }
.chip-B { background: rgba(255,200,0,0.25); color: #b45309; }

/* --- Avatar --- */
.ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 0 4px #fff;
}

/* --- Inputs --- */
input[type="text"], input[type="number"], input:not([type]) {
  outline: none;
}
input:focus {
  box-shadow: 0 0 0 3px rgba(88,204,2,0.3);
}

/* --- Menu: lateral (desktop) / barra inferior (celular) --- */
.has-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.sidenav { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(6, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: #1b120c;
  border-top: 3px solid #5a3418;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.25);
}
.tabbar-link {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; border-radius: 12px;
  color: rgba(246,239,228,0.6);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 10px; font-weight: 800; text-decoration: none;
}
.tabbar-link svg, .sidenav-link svg {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tabbar-link.is-active { color: #fff; background: #137a40; }
.tabbar-link:active { transform: translateY(1px); }

@media (min-width: 768px) {
  .has-nav { padding-bottom: 0; padding-left: 232px; }
  .tabbar { display: none; }
  .sidenav {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
    width: 232px; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 4px;
    padding: 20px 14px;
    background:
      repeating-linear-gradient(95deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 9px),
      linear-gradient(180deg, #2a1b12, #1b120c);
    border-right: 4px solid #5a3418;
    font-family: 'Nunito', system-ui, sans-serif;
  }
  .sidenav-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 18px; margin-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #fff8ec; font-size: 1.2rem; font-weight: 900; text-decoration: none;
  }
  .sidenav-ball {
    width: 30px; height: 30px; border-radius: 50%; background: #111;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: inset -2px -3px 4px rgba(0,0,0,.5), inset 2px 2px 3px rgba(255,255,255,.25);
  }
  .sidenav-ball i {
    font-style: normal; font-size: 11px; font-weight: 900; color: #111;
    background: #fff; border-radius: 50%; width: 15px; height: 15px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .sidenav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 14px;
    color: rgba(246,239,228,0.75); font-weight: 800; text-decoration: none;
  }
  .sidenav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
  .sidenav-link.is-active { background: #137a40; color: #fff; box-shadow: inset 0 -3px 0 #0b4d27; }
  .sidenav-sep {
    margin: 14px 12px 4px; font-size: 0.68rem; font-weight: 900;
    letter-spacing: 0.2em; text-transform: uppercase; color: #e9b44c;
  }
  .hide-desktop { display: none !important; }
}
