* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F8FAFC;
  color: #1E293B;
  line-height: 1.6;
}

/* --- Layout Principal --- */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: #1E293B;
  color: white;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
  position: relative; /* Necessário para o z-index funcionar corretamente */
  z-index: 1000; /* ✅ CORREÇÃO: Define a camada da sidebar */
}

.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* --- Cabeçalhos e Títulos --- */
.view-header {
  margin-bottom: 2rem;
}

.view-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.view-header p {
  color: #64748B;
}

/* --- Elementos de Formulário --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1E293B;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #E2E8F0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
  font-size: 0.875rem;
  color: #64748B;
}

.form-divider {
  border: none;
  height: 1px;
  background-color: #e2e8f0;
  margin: 2rem 0;
}

/* --- Botões --- */
.btn-primary {
  width: 100%;
  padding: 0.875rem;
  background: #6366F1;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #4F46E5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background-color: #64748B;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: #475569;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-logout {
  width: 100%;
  padding: 0.625rem;
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  border: 1px solid #EF4444;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: #EF4444;
  color: white;
}

.btn-link {
  background: none;
  border: none;
  color: #6366F1;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.btn-link:hover {
  color: #4F46E5;
}


/* --- Utilitários --- */
.loading {
  text-align: center;
  padding: 2rem;
  color: #6366F1;
}

.no-data {
  text-align: center;
  padding: 3rem;
  color: #94A3B8;
}

@media (max-width: 768px) {
  .app-container {
      flex-direction: column;
  }
  .sidebar {
      width: 100%;
  }
}