/* 
 * UnitV Pro — Painel Administrativo Otimizado
 * Cores: Preto (#080305) + Vermelho (#ef4444)
 */

:root {
  --bg-root: #030203;
  --bg-surface: #0a0508;
  --bg-elevated: #12080c;
  --bg-input: rgba(255, 255, 255, 0.05);
  --border: rgba(220, 38, 38, 0.15);
  --border-strong: rgba(220, 38, 38, 0.3);
  --text: #fafafa;
  --text-muted: rgba(255, 255, 255, 0.5);
  --accent: #ef4444;
  --accent-hover: #f87171;
  --sidebar-w: 280px;
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-root);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.app-body {
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(239, 68, 68, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(127, 29, 29, 0.1) 0%, transparent 40%);
  background-attachment: fixed;
}

/* --- Sidebar (PC & Mobile) --- */
.app-sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, #080305 0%, #12080c 100%);
  border-right: 1px solid var(--border);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar__brand {
  padding: 25px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.app-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.app-sidebar__logo-mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800;
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.app-sidebar__nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.app-sidebar__label {
  color: rgba(248, 113, 113, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 20px 0 10px 10px;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.2s;
  margin-bottom: 4px;
}

.app-nav-link:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  transform: translateX(4px);
}

.app-nav-link.is-active {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, transparent 100%);
  color: #ef4444;
  font-weight: 700;
  border-left: 3px solid #ef4444;
}

/* --- Topbar --- */
.app-topbar {
  height: 70px;
  background: rgba(8, 3, 5, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
}

/* --- Content Area --- */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: all 0.3s ease;
}

/* --- Mobile Adjustments --- */
@media (max-width: 991px) {
  .app-sidebar {
    left: calc(var(--sidebar-w) * -1);
  }
  .app-sidebar.active {
    left: 0;
    box-shadow: 15px 0 40px rgba(0, 0, 0, 0.8);
  }
  .app-main {
    margin-left: 0;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1040;
  }
  .sidebar-overlay.active {
    display: block;
  }
}

/* --- Cards & UI Elements --- */
.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: 0.3s;
}

.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.btn-app-danger {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 700;
  transition: 0.3s;
}

.btn-app-danger:hover {
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
  filter: brightness(1.1);
}

/* Gradiente Animado */
.gradient-sidebar-text {
  background: linear-gradient(270deg, #ffffff, #fca5a5, #ef4444, #ffffff);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: changeColorSidebar 8s ease infinite;
}

@keyframes changeColorSidebar {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
