/* CSS do casco — não depende do Tailwind. Sempre em /shell.css
   Se o CSS do Next (_next/static) falhar (404/cache antigo), a tela continua usável. */
:root {
  --app-header-height: 56px;
  --shell-sidebar-width: 20rem;
  --brand: #d0e038;
  --brand-border: #d4de8a;
  --bg: #f6f7f0;
  --ink: #0f172a;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

header.atus-topbar {
  display: flex !important;
  align-items: center;
  height: var(--app-header-height) !important;
  max-height: var(--app-header-height) !important;
  overflow: hidden !important;
  background: #fff;
  border-bottom: 1px solid var(--brand-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-logo-wrap {
  width: 120px;
  height: 36px;
  overflow: hidden !important;
  flex-shrink: 0;
}

img.brand-logo {
  display: block !important;
  height: 32px !important;
  max-height: 36px !important;
  max-width: 120px !important;
  width: auto !important;
  object-fit: contain !important;
}

.brand-badge {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #111;
  font-weight: 800;
  border-radius: 8px;
  font-size: 16px;
}

/* Layout principal — evita menu flutuando em cima do conteúdo sem Tailwind */
.app-main-content {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: clip;
}

.page-shell {
  padding: 1rem 1rem 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  aside.atus-sidebar,
  aside[class*="fixed"][class*="left-0"] {
    position: fixed !important;
    top: var(--app-header-height) !important;
    left: 0 !important;
    bottom: 0 !important;
    width: var(--shell-sidebar-width);
    max-width: 90vw;
    background: #fff;
    border-right: 1px solid var(--brand-border);
    z-index: 40;
    overflow-y: auto;
  }
}

button, input, select, textarea {
  font: inherit;
}
