/* =========================================================
   Route 68 – Painel de Controlo Oficial (Atlantic RP)
   Estética: Dark Street Tuner / Racing Neon
   Paleta: Asfalto Noturno + Verde Neon Route 68 (#00f06a)
   ========================================================= */

:root {
  /* Tons de Asfalto e Superfície */
  --bg-deep: #080b09;
  --bg-surface: #0f1411;
  --bg-card: #151b17;
  --bg-card-hover: #1b231e;
  --bg-card-active: #212c25;
  --bg-input: #0a0e0c;

  /* Bordas e Divisores */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(46, 68, 54, 0.45);
  --border-hover: rgba(0, 240, 106, 0.35);
  --border-glow: rgba(0, 240, 106, 0.6);

  /* Texto */
  --texto: #f1f7f3;
  --texto-2: #9cb1a3;
  --texto-muted: #5e7366;

  /* Verde Neon Route 68 */
  --verde: #00f06a;
  --verde-hover: #1bf87e;
  --verde-active: #02d45e;
  --verde-tinta: rgba(0, 240, 106, 0.12);
  --verde-tinta-forte: rgba(0, 240, 106, 0.22);
  --verde-glow: 0 0 16px rgba(0, 240, 106, 0.28);
  --verde-glow-forte: 0 0 24px rgba(0, 240, 106, 0.45);

  /* Cores de Estado e Acentos */
  --ambar: #f5b331;
  --ambar-tinta: rgba(245, 179, 49, 0.14);
  --ambar-glow: 0 0 14px rgba(245, 179, 49, 0.25);

  --vermelho: #ff4d5e;
  --vermelho-hover: #ff6e7d;
  --vermelho-tinta: rgba(255, 77, 94, 0.14);
  --vermelho-glow: 0 0 14px rgba(255, 77, 94, 0.25);

  --azul: #3b82f6;

  /* Tipografia */
  --fonte-display: 'Chakra Petch', 'Overpass', sans-serif;
  --fonte-corpo: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--border-card) var(--bg-deep);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse at 15% 0%, rgba(0, 240, 106, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 100%, rgba(0, 240, 106, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--texto);
  font: 400 0.95rem/1.55 var(--fonte-corpo);
  overflow-x: hidden;
}

/* Scrollbars customizadas */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--bg-card-active);
  border-radius: 99px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: #2e593d; }

h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--verde);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.ic {
  width: 18px; height: 18px; flex: none;
  stroke-width: 2.2;
}

/* ---------- Efeito de Ponto Pulsante ---------- */
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--verde);
  display: inline-block;
  box-shadow: 0 0 8px var(--verde);
  animation: pulsoNeon 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  vertical-align: middle;
  flex: none;
}
@keyframes pulsoNeon {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--verde); }
  50% { opacity: 0.5; transform: scale(0.85); box-shadow: 0 0 2px var(--verde); }
}

/* ---------- Estrutura Principal ---------- */
.app {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(15, 20, 17, 0.98) 0%, rgba(10, 14, 12, 0.99) 100%);
  border-right: 1px solid var(--border-card);
  backdrop-filter: blur(16px);
  z-index: 20;
  overflow-x: hidden;
}

main {
  padding: clamp(20px, 3.5vw, 42px);
  min-width: 0;
}
main > .conteudo {
  max-width: 1280px;
  margin: 0 auto;
}
main:focus { outline: none; }

/* ---------- Identidade e Logótipo na Sidebar (Compacto e Elegante) ---------- */
.brand-wrapper {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border-card);
  background: linear-gradient(180deg, rgba(0, 240, 106, 0.05) 0%, rgba(15, 20, 17, 0.3) 100%);
  position: relative;
}
.brand-wrapper::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 106, 0.3), transparent);
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.brand:hover {
  background: rgba(0, 240, 106, 0.04);
  border-color: rgba(0, 240, 106, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 240, 106, 0.1);
}

.brand-logo-card {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(0, 240, 106, 0.18) 0%, rgba(15, 20, 17, 0.85) 75%);
  border: 1px solid rgba(0, 240, 106, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 240, 106, 0.12);
  transition: all 0.25s ease;
  overflow: hidden;
}
.brand:hover .brand-logo-card {
  border-color: var(--verde);
  box-shadow: 0 0 16px rgba(0, 240, 106, 0.38), inset 0 0 12px rgba(0, 240, 106, 0.2);
  transform: scale(1.03);
}

.brand-logo {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.7));
  transition: transform 0.25s ease;
}
.brand:hover .brand-logo {
  transform: scale(1.05);
}

.brand-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.brand-tag {
  font-family: var(--fonte-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--verde);
  text-transform: uppercase;
  line-height: 1;
}

.brand-name {
  font-family: var(--fonte-display);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
  line-height: 1.15;
  text-shadow: 0 0 12px rgba(0, 240, 106, 0.25);
}

.org-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--fonte-display);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--texto-2);
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(0, 240, 106, 0.06);
  border: 1px solid rgba(0, 240, 106, 0.18);
  margin-top: 2px;
  line-height: 1.2;
}

/* ---------- Navegação Lateral ---------- */
.nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 14px 14px;
}

.nav-group + .nav-group {
  margin-top: 10px;
}

.nav-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--texto);
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}
.nav-toggle:hover {
  background: var(--bg-card);
  color: #fff;
  border-color: var(--border-subtle);
}
.nav-toggle > span { flex: 1; }
.nav-toggle .ic:first-child { color: var(--verde); }
.nav-toggle .chev {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--texto-muted);
}
.nav-group.open .chev { transform: rotate(180deg); color: var(--verde); }

.nav-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-group.open .nav-sub { grid-template-rows: 1fr; }
.nav-sub > div { overflow: hidden; min-height: 0; }
.nav-group:not(.open) .nav-sub > div { visibility: hidden; }

.nav-list {
  margin: 6px 8px 10px 16px;
  padding: 0 0 0 12px;
  border-left: 2px solid rgba(0, 240, 106, 0.25);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  box-sizing: border-box;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--texto-2);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.nav-link:hover {
  background: var(--bg-card);
  color: var(--texto);
  border-color: var(--border-subtle);
}
.nav-link.active {
  background: var(--verde-tinta);
  border-color: rgba(0, 240, 106, 0.35);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--verde);
}
.nav-link > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.count {
  flex: none;
  min-width: 24px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--texto-2);
  font-family: var(--fonte-display);
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
}
.count.pend {
  background: var(--ambar-tinta);
  color: var(--ambar);
  border-color: rgba(245, 179, 49, 0.35);
  box-shadow: var(--ambar-glow);
}
.nav-link.active .count {
  background: rgba(0, 240, 106, 0.25);
  color: var(--verde-hover);
  border-color: rgba(0, 240, 106, 0.4);
}

.nav-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 99px;
  border: 1px dashed rgba(0, 240, 106, 0.35);
  background: rgba(0, 240, 106, 0.04);
  color: var(--verde);
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 4px;
  box-sizing: border-box;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.nav-add:hover {
  background: var(--verde-tinta);
  border-color: var(--verde);
  box-shadow: var(--verde-glow);
}

/* Rodapé da Sidebar */
.side-foot {
  padding: 14px;
  border-top: 1px solid var(--border-card);
  background: rgba(10, 14, 12, 0.5);
  display: grid;
  gap: 4px;
}
.foot-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--texto-2);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.16s ease;
}
.foot-btn:hover {
  background: var(--bg-card);
  color: var(--texto);
  border-color: var(--border-subtle);
}
.foot-btn .ic { color: var(--texto-muted); transition: color 0.15s; }
.foot-btn:hover .ic { color: var(--verde); }
.foot-btn.perigo:hover {
  color: var(--vermelho);
  background: var(--vermelho-tinta);
  border-color: rgba(255, 77, 94, 0.25);
}
.foot-btn.perigo:hover .ic { color: var(--vermelho); }

/* ---------- Placa / Hero Header da Página ---------- */
.placa {
  background: linear-gradient(135deg, rgba(21, 27, 23, 0.95) 0%, rgba(13, 17, 15, 0.95) 100%);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.7);
}
.placa::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--verde) 0%, rgba(0, 240, 106, 0.2) 60%, transparent 100%);
  box-shadow: 0 0 12px var(--verde);
}
.placa::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 106, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.placa-in {
  padding: clamp(22px, 3.2vw, 34px) clamp(22px, 3.5vw, 38px);
  position: relative;
  z-index: 2;
}

.placa-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.placa-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fonte-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--verde);
  text-transform: uppercase;
}

.placa-id {
  font-family: var(--fonte-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--texto-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.placa h1 {
  font-family: var(--fonte-display);
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.placa-desc {
  margin-top: 8px;
  color: var(--texto-2);
  font-size: 0.96rem;
  max-width: 65ch;
}

/* Estatísticas em badges no cabeçalho */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  font-size: 0.84rem;
  color: var(--texto-2);
  backdrop-filter: blur(8px);
}
.stat-badge strong {
  color: #ffffff;
  font-family: var(--fonte-display);
  font-size: 0.95rem;
}
.stat-ico {
  display: grid;
  place-items: center;
  color: var(--verde);
}
.stat-badge.destaque-pend {
  border-color: rgba(245, 179, 49, 0.4);
  background: var(--ambar-tinta);
  color: var(--ambar);
}
.stat-badge.destaque-pend .stat-ico { color: var(--ambar); }

/* ---------- Barra de Ferramentas ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
}

.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 440px;
}
.search .ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--texto-muted);
  pointer-events: none;
  transition: color 0.15s;
}
.search input {
  padding-left: 42px !important;
}
.search input:focus + .ic,
.search:focus-within .ic {
  color: var(--verde);
}

.toolbar .fim {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Botões Modernos ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--texto);
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: #fff;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-active) 100%);
  border-color: var(--verde);
  color: #04140a;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 240, 106, 0.35);
}
.btn.primary:hover {
  background: linear-gradient(135deg, var(--verde-hover) 0%, var(--verde) 100%);
  border-color: var(--verde-hover);
  color: #020c06;
  box-shadow: 0 6px 20px rgba(0, 240, 106, 0.5);
  transform: translateY(-2px);
}
.btn.primary.glow {
  box-shadow: 0 4px 18px rgba(0, 240, 106, 0.4);
}

.btn.primary-subtle {
  background: var(--verde-tinta);
  border-color: rgba(0, 240, 106, 0.35);
  color: var(--verde);
}
.btn.primary-subtle:hover {
  background: var(--verde);
  border-color: var(--verde);
  color: #04140a;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

.btn.small {
  height: 34px;
  padding: 0 13px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn.icon-btn, .icon-btn {
  width: 42px;
  padding: 0;
}
.btn.perigo:hover {
  color: var(--vermelho);
  border-color: rgba(255, 77, 94, 0.45);
  background: var(--vermelho-tinta);
}
.btn.perigo-fill {
  background: linear-gradient(135deg, var(--vermelho) 0%, #d83344 100%);
  border-color: var(--vermelho);
  color: #ffffff;
  box-shadow: var(--vermelho-glow);
}
.btn.perigo-fill:hover {
  background: linear-gradient(135deg, var(--vermelho-hover) 0%, var(--vermelho) 100%);
  border-color: var(--vermelho-hover);
}

.mini {
  width: 32px; height: 32px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: rgba(15, 20, 17, 0.85);
  color: var(--texto-2);
  transition: all 0.16s ease;
}
.mini:hover {
  color: #ffffff;
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: scale(1.06);
}
.mini.perigo:hover {
  color: var(--vermelho);
  background: var(--vermelho-tinta);
  border-color: rgba(255, 77, 94, 0.4);
}

/* ---------- Campos e Inputs Modernos ---------- */
.in {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--texto);
  font-size: 0.92rem;
  transition: all 0.18s ease;
}
.in::placeholder { color: var(--texto-muted); }
.in:focus {
  outline: none;
  border-color: var(--verde);
  background: #0d120f;
  box-shadow: 0 0 0 3px rgba(0, 240, 106, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
textarea.in {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}
select.in {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239cb1a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.campo {
  display: grid;
  gap: 7px;
  align-content: start;
}
.campo > span {
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--texto);
}
.campo small, .bloco small, .img-ctrl small {
  color: var(--texto-muted);
  font-size: 0.8rem;
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.row2.juntos { gap: 12px; }

/* ---------- Layout de Casas e Armazéns ---------- */
.casa-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.sec-head h2 {
  font-family: var(--fonte-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.sec-accent {
  width: 4px; height: 18px;
  border-radius: 4px;
  background: var(--verde);
  display: inline-block;
  box-shadow: 0 0 8px var(--verde);
}

/* ---------- Grid e Cards de Itens ---------- */
.itens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.item {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4);
}
.item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 240, 106, 0.12);
}

.item-img {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #1a221d 0%, #101512 85%);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}
.item-img img {
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  transition: transform 0.25s ease;
}
.item:hover .item-img img {
  transform: scale(1.08);
}

.ini {
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--verde);
  letter-spacing: 0.04em;
  opacity: 0.75;
  text-shadow: 0 0 14px rgba(0, 240, 106, 0.3);
}

.item-tools {
  position: absolute;
  top: 8px; right: 8px;
  display: flex;
  gap: 5px;
  opacity: 0.9;
  transition: opacity 0.18s;
  z-index: 5;
}
.item:hover .item-tools { opacity: 1; }

.item-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.item-nome {
  padding: 12px 14px 4px;
  font-family: var(--fonte-corpo);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #ffffff;
}

.qty {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 6px;
  padding: 8px 12px 12px;
  margin-top: auto;
}
.qty-btn {
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--texto-2);
  transition: all 0.15s ease;
}
.qty-btn:hover {
  background: var(--verde-tinta);
  border-color: var(--verde);
  color: var(--verde);
  transform: scale(1.05);
}
.qty-btn:active {
  transform: scale(0.94);
}
.qty-in {
  width: 100%;
  height: 36px;
  text-align: center;
  padding: 0 4px;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-deep);
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff;
  -moz-appearance: textfield;
  appearance: textfield;
  transition: border-color 0.15s;
}
.qty-in::-webkit-outer-spin-button, .qty-in::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.qty-in:focus {
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 2px rgba(0, 240, 106, 0.25);
}

/* ---------- Gestão da Casa & Membros ---------- */
.gestao {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 18px;
  position: sticky;
  top: 24px;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  width: 100%;
}
.gestao .sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.gestao .sec-head h2 {
  font-size: 1.12rem;
  white-space: normal;
  line-height: 1.2;
}
.gestao .sec-head .btn.small {
  height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.gestao .dica {
  color: var(--texto-muted);
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.gestao .membro-search {
  max-width: 100%;
  width: 100%;
  margin-bottom: 12px;
  display: block;
}
.gestao .membro-search .in {
  height: 38px;
  font-size: 0.86rem;
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}
.gestao .membro-search .in:focus {
  background: #0d120f;
  border-color: var(--verde);
}

.membros {
  display: grid;
  gap: 8px;
}
.membros .vazio {
  padding: 24px 14px;
  gap: 6px;
  border-radius: 12px;
}
.membros .vazio strong {
  font-size: 0.92rem;
  color: var(--texto);
}
.membros .vazio p {
  font-size: 0.82rem;
  color: var(--texto-2);
}
.membro {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all 0.16s ease;
}
.membro:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateX(2px);
}

.av {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(0, 240, 106, 0.2) 0%, rgba(15, 20, 17, 0.8) 100%);
  border: 1px solid rgba(0, 240, 106, 0.3);
  color: var(--verde);
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: inset 0 0 10px rgba(0, 240, 106, 0.1);
}

.membro-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.membro-nome {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 700;
  color: #ffffff;
}
.membro-nome span:first-child {
  overflow-wrap: anywhere;
}
.membro small {
  display: block;
  color: var(--texto-2);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.discord-tag {
  color: var(--texto-muted);
  font-weight: 600;
}

.badge {
  font-family: var(--fonte-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--texto-2);
  text-transform: uppercase;
}
.badge.acc-gestor {
  background: linear-gradient(135deg, rgba(0, 240, 106, 0.2) 0%, rgba(2, 212, 94, 0.3) 100%);
  color: var(--verde-hover);
  border: 1px solid rgba(0, 240, 106, 0.4);
  box-shadow: var(--verde-glow);
}
.membro-acoes { display: flex; gap: 5px; flex-shrink: 0; }

/* ---------- Estados Vazios ---------- */
.vazio {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding: 42px 24px;
  border: 2px dashed rgba(46, 68, 54, 0.6);
  border-radius: 16px;
  background: rgba(15, 20, 17, 0.4);
  color: var(--texto-2);
}
.vazio strong {
  color: #ffffff;
  font-family: var(--fonte-display);
  font-size: 1.15rem;
}
.vazio p {
  max-width: 46ch;
  font-size: 0.92rem;
  color: var(--texto-muted);
}

/* ---------- Chips de Filtro (Encomendas) ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.chip {
  height: 38px;
  padding: 0 16px;
  border-radius: 99px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--texto-2);
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  transition: all 0.18s ease;
}
.chip:hover {
  color: #ffffff;
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}
.chip[aria-pressed="true"] {
  background: var(--verde-tinta-forte);
  border-color: var(--verde);
  color: var(--verde);
  box-shadow: var(--verde-glow);
}
.chip .n {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.74rem;
}

/* ---------- Lista e Cards de Encomendas ---------- */
.enc-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr));
  gap: 18px;
}

.enc {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}
.enc:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 240, 106, 0.1);
  transform: translateY(-2px);
}
.enc.cancelada {
  opacity: 0.65;
  filter: grayscale(0.2);
}

.enc-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.org-av {
  width: 48px; height: 48px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 240, 106, 0.25) 0%, rgba(10, 14, 12, 0.9) 100%);
  border: 1px solid rgba(0, 240, 106, 0.4);
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--verde);
  box-shadow: var(--verde-glow);
}

.enc-org {
  flex: 1;
  min-width: 0;
}
.enc-org h3 {
  font-family: var(--fonte-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  overflow-wrap: anywhere;
}
.enc-org time {
  color: var(--texto-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 99px;
  font-family: var(--fonte-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.pill.pendente {
  background: var(--ambar-tinta);
  border: 1px solid rgba(245, 179, 49, 0.4);
  color: var(--ambar);
  box-shadow: var(--ambar-glow);
}
.pill.concluida {
  background: var(--verde-tinta-forte);
  border: 1px solid rgba(0, 240, 106, 0.4);
  color: var(--verde);
  box-shadow: var(--verde-glow);
}
.pill.cancelada {
  background: var(--vermelho-tinta);
  border: 1px solid rgba(255, 77, 94, 0.4);
  color: var(--vermelho);
}

/* Área de Troca (Trade Grid) */
.troca {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
}

.lado h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-family: var(--fonte-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--texto);
}
.lado h4 .ic { color: var(--texto-muted); }
.lado.entra h4 .ic { color: var(--verde); }
.lado h4 .dir {
  flex-basis: 100%;
  margin: -4px 0 0 25px;
  font-family: var(--fonte-corpo);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--texto-muted);
}
.lado.entra h4 .dir { color: var(--verde); }

.lado ul {
  display: grid;
  gap: 6px;
}
.lado li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  min-height: 40px;
  font-size: 0.88rem;
}
.lado.entra li {
  border-left: 3px solid var(--verde);
}
.lado li b {
  font-family: var(--fonte-display);
  font-weight: 700;
  color: #ffffff;
  min-width: 2.2ch;
}
.lado li span { overflow-wrap: anywhere; }
.lado li.nada {
  color: var(--texto-muted);
  background: transparent;
  border: 1px dashed var(--border-subtle);
  box-shadow: none;
}
.thumb {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 6px;
  object-fit: contain;
  background: var(--bg-deep);
}

.via {
  position: relative;
  display: grid;
  place-items: center;
}
.via::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  border-left: 2px dashed rgba(0, 240, 106, 0.25);
  transform: translateX(-50%);
}
.via .ic {
  position: relative;
  width: 28px; height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--verde);
}

.enc-notas {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--texto-2);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.enc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.enc-foot .fim {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

@container (max-width: 460px) {
  .troca { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lado h4 .dir { flex-basis: auto; margin: 0; }
  .via { height: 28px; }
  .via::before {
    top: 50%; bottom: auto; left: 0; right: 0;
    border-left: 0;
    border-top: 2px dashed rgba(0, 240, 106, 0.25);
    transform: none;
  }
  .via .ic { transform: rotate(90deg); }
}

/* ---------- Modais & Diálogos ---------- */
dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid rgba(0, 240, 106, 0.35);
  border-radius: 20px;
  background: linear-gradient(180deg, #161c18 0%, #0f1411 100%);
  color: var(--texto);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 240, 106, 0.15);
}
dialog.larga { width: min(720px, calc(100vw - 28px)); }
dialog.estreita { width: min(440px, calc(100vw - 28px)); }

dialog::backdrop {
  background: rgba(4, 7, 5, 0.82);
  backdrop-filter: blur(10px);
}

dialog[open] {
  display: flex;
  flex-direction: column;
  animation: modalSurgir 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
dialog form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 30px);
}
@keyframes modalSurgir {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.dlg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}
.dlg-head h2 {
  font-family: var(--fonte-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.dlg-body {
  display: grid;
  gap: 18px;
  padding: 24px;
  overflow-y: auto;
}

.dlg-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 14, 12, 0.6);
}

.conf h2 {
  font-family: var(--fonte-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}
.conf p {
  color: var(--texto-2);
  font-size: 0.95rem;
  line-height: 1.5;
}

.img-field {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
}
.img-prev {
  width: 110px; height: 110px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: radial-gradient(circle, #1a221d 0%, #0d120f 85%);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
}
.img-prev img {
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
}
.img-ctrl {
  display: grid;
  gap: 10px;
  align-content: start;
}
.img-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bloco {
  padding: 16px;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  background: var(--bg-surface);
}
.bloco.entra-bloco {
  border-left: 4px solid var(--verde);
  background: linear-gradient(90deg, rgba(0, 240, 106, 0.05) 0%, var(--bg-surface) 100%);
}
.bloco h3 {
  font-family: var(--fonte-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}
.linhas { display: grid; gap: 8px; }
.linha {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 36px;
  gap: 8px;
}
.linha .mini { height: 42px; width: 36px; }
.bloco .btn { justify-self: start; }

/* ---------- Toast Notifications ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  max-width: calc(100vw - 36px);
  padding: 12px 22px;
  border-radius: 12px;
  background: #141b16;
  border: 1px solid var(--border-card);
  color: #ffffff;
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 240, 106, 0.15);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.erro {
  border-color: var(--vermelho);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), var(--vermelho-glow);
}
.toast.ok {
  border-color: var(--verde);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), var(--verde-glow);
}

/* ---------- Topbar Móvel ---------- */
.topbar { display: none; }
.scrim { display: none; }

.brand-sm {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  cursor: default;
}
.brand-logo-sm {
  width: 38px; height: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 106, 0.3);
  padding: 2px;
}
.brand-txt-sm {
  display: flex;
  flex-direction: column;
}
.brand-txt-sm strong {
  font-family: var(--fonte-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
}
.brand-txt-sm small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--texto-2);
}

/* ---------- Item usage forecast (subtle) ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.uso-panel {
  margin-top: 28px;
  margin-bottom: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}
.uso-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.uso-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fonte-corpo);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--texto-muted);
  text-transform: uppercase;
}
.uso-title .ic {
  width: 15px; height: 15px;
  opacity: 0.55;
  stroke-width: 2;
}
.uso-dias-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.uso-dias-lbl {
  font-size: 0.75rem;
  color: var(--texto-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.uso-dias {
  min-width: 4.2rem;
  padding: 5px 10px;
  font-size: 0.82rem;
  border-color: var(--border-subtle);
  background: transparent;
  color: var(--texto-2);
}

.uso-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
button.uso-chip,
.uso-chip.on {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 30px;
  border-radius: 99px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--texto-muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
button.uso-chip {
  padding: 0 12px;
  cursor: pointer;
}
button.uso-chip:hover {
  color: var(--texto-2);
  border-color: var(--border-card);
  background: rgba(255, 255, 255, 0.02);
}
.uso-chip.on {
  padding: 0 4px 0 0;
  border-color: rgba(0, 240, 106, 0.22);
  background: rgba(0, 240, 106, 0.05);
  color: var(--texto);
}
.uso-chip-nome {
  padding: 0 10px 0 12px;
  height: 100%;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 99px 0 0 99px;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uso-chip-nome:hover { color: var(--verde); }
.uso-chip-rate {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-right: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.uso-por-dia {
  width: 2.6rem;
  padding: 2px 4px;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--texto);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
}
.uso-por-dia:focus-visible {
  outline: 1px solid var(--verde);
  outline-offset: 1px;
}
.uso-chip-sfx {
  font-size: 0.72rem;
  color: var(--texto-muted);
  user-select: none;
}

.uso-chart {
  border-radius: 10px;
  padding: 4px 0 0;
  min-height: 120px;
}
.uso-placeholder {
  margin: 0;
  padding: 28px 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--texto-muted);
  border: 1px dashed var(--border-subtle);
  border-radius: 10px;
}
.uso-vazio {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--texto-muted);
}
.uso-svg { width: 100%; height: auto; display: block; opacity: 0.92; }
.uso-grid { stroke: rgba(255, 255, 255, 0.04); stroke-width: 1; }
.uso-zero { stroke: rgba(255, 77, 94, 0.28); stroke-width: 1; stroke-dasharray: 4 6; }
.uso-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.88; }
.uso-dot { opacity: 0.9; }
.uso-axis {
  fill: var(--texto-muted);
  font-size: 10px;
  font-family: var(--fonte-corpo);
  opacity: 0.85;
}

.uso-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  padding: 0;
}
.uso-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--texto-muted);
}
.uso-leg-cor {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex: none;
  opacity: 0.9;
}
.uso-leg-nome { color: var(--texto-2); font-weight: 500; }
.uso-leg-st {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.85;
}
.uso-leg.neg .uso-leg-st { color: var(--vermelho); }
.uso-leg.pos .uso-leg-st { color: var(--verde); }
.uso-leg-det { opacity: 0.9; }

/* ---------- Responsividade ---------- */
@media (max-width: 1120px) {
  .casa-layout { grid-template-columns: minmax(0, 1fr); }
  .gestao { position: static; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 12px 18px;
    background: rgba(15, 20, 17, 0.95);
    border-bottom: 1px solid var(--border-card);
    backdrop-filter: blur(12px);
  }
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    z-index: 50;
    width: min(350px, 88vw);
    transform: translateX(-100%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.85);
  }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(4, 7, 5, 0.75);
    backdrop-filter: blur(4px);
  }
  .toolbar .fim { margin-left: 0; width: 100%; justify-content: flex-end; }
}

@media (max-width: 580px) {
  .row2 { grid-template-columns: 1fr; }
  .img-field { grid-template-columns: 1fr; }
  .search { max-width: none; flex: 1 1 100%; }
  .dlg-foot .btn { flex: 1; }
  .toolbar .fim { justify-content: stretch; }
  .toolbar .fim .btn.primary { flex: 1; }
  .enc-foot .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Indicador de Sincronização Cloudflare D1 ---------- */
.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 6px var(--verde);
  margin-right: 4px;
  animation: neon-pulse 2s infinite ease-in-out;
}
@keyframes neon-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.76rem;
  font-family: var(--fonte-corpo);
  color: var(--texto-2);
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  margin: 0 12px 10px 12px;
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 8px var(--verde);
  flex-shrink: 0;
}
.sync-status.offline .sync-dot {
  background: #7a8c80;
  box-shadow: none;
}
.sync-status.syncing .sync-dot {
  background: var(--ambar);
  box-shadow: 0 0 8px var(--ambar);
  animation: neon-pulse 0.8s infinite ease-in-out;
}

