/* Shell compartilhado — Leviata (sidebar + topbar) */
:root {
  --bg: #050506;
  --surface: rgba(12, 12, 14, 0.92);
  --surface-solid: #0c0c0e;
  --surface-2: #121214;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f2f2f4;
  --muted: #8b8b96;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --ok: #34d399;
  --danger: #f87171;
  --radius: 10px;
  --font: "Sora", system-ui, sans-serif;
  --display: "Syne", "Sora", sans-serif;
  --side-w: 248px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: linear-gradient(180deg, #000 0%, #050506 50%, #020203 100%);
}
.fx-aurora, .fx-aurora-2 {
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  filter: blur(34px) saturate(1.05);
  animation: auroraDrift 20s ease-in-out infinite alternate;
}
.fx-aurora {
  background:
    radial-gradient(38% 32% at 16% 20%, rgba(37, 99, 235, 0.16), transparent 72%),
    radial-gradient(32% 36% at 88% 14%, rgba(59, 130, 246, 0.08), transparent 70%);
}
.fx-aurora-2 {
  opacity: 0.35;
  animation-direction: alternate-reverse;
  background:
    radial-gradient(26% 22% at 28% 65%, rgba(59, 130, 246, 0.1), transparent 72%);
}
@keyframes auroraDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(2%, -1%, 0) scale(1.03); }
}

.layout {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 20; }
}

.sidebar {
  background: linear-gradient(180deg, rgba(12, 18, 32, 0.95) 0%, rgba(0, 0, 0, 0.92) 40%, rgba(0, 0, 0, 0.96) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.9rem 0.7rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  backdrop-filter: blur(14px);
}
.sidebar-brand {
  padding: 0.35rem 0.35rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand-top { display: flex; align-items: center; gap: 0.65rem; }
.brand-icon-img {
  width: 38px; height: 38px; object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.25));
}
.brand-stack > span:first-child {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.02rem;
  display: block;
}
.brand-war {
  display: block;
  color: #8b93a7;
  font-size: 0.66rem;
  margin-top: 0.18rem;
}
.ops-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  font-size: 0.64rem;
  font-weight: 600;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
}
.ops-chip i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.nav-group {
  margin: 0 0.35rem 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}
.sidebar-nav { display: flex; flex-direction: column; flex: 1; gap: 1rem; overflow: auto; }
.nav-block { display: grid; gap: 0.28rem; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #9aa3b5;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.8; }
.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
}
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.08));
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: inset 3px 0 0 #3b82f6;
}
.nav-item.active svg { opacity: 1; color: #93c5fd; }
.nav-pill {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), #1d4ed8);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8rem;
}
.user-chip-text span { display: block; font-weight: 600; font-size: 0.8rem; }
.user-chip-text small { color: var(--muted); font-size: 0.64rem; }

.main-wrap { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.35rem;
}
.topbar-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}
.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ok);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.main { padding: 1.25rem 1.35rem 2.5rem; max-width: 1140px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #4f8ff7; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.btn-soft {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.btn-block { width: 100%; }

.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem;
  margin-bottom: 1rem;
}
.field { display: grid; gap: 0.35rem; }
.field span, .field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.58rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.ops-section-label {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7a96;
  font-weight: 600;
}
