#admin-container {
  display: flex;
  min-height: calc(100vh - 64px);
}

#sidebar {
  width: 220px;
  background: #222;
  padding: 24px 0;
  flex-shrink: 0;
}

#sidebar ul {
  list-style: none;
}

#sidebar ul li {
  padding: 16px 24px;
  color: #ccc;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

#sidebar ul li:hover, #sidebar ul li.ativo {
  background: #ff6b35;
  color: white;
}

#admin-main {
  flex: 1;
  padding: 32px;
  background: #f5f5f5;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.admin-table th {
  background: #ff6b35;
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #fff8f5;
}

.admin-table img {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
}

.btn-editar {
  background: #3498db;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-right: 6px;
  transition: opacity 0.2s;
}

.btn-editar:hover { opacity: 0.8; }

.btn-deletar {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-deletar:hover { opacity: 0.8; }

.btn-status {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: #2ecc71;
  color: white;
}

.modal-content textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 14px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border 0.2s;
}

.modal-content textarea:focus { border-color: #ff6b35; }

.modal-content select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 14px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: border 0.2s;
}

.modal-content select:focus { border-color: #ff6b35; }

.modal-content label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
  color: #555;
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-pendente { background: #ffeaa7; color: #d35400; }
.badge-em_preparo { background: #dfe6e9; color: #2d3436; }
.badge-saiu_para_entrega { background: #74b9ff; color: white; }
.badge-entregue { background: #55efc4; color: #00b894; }
.badge-cancelado { background: #fab1a0; color: #e17055; }

/* --- RESPONSIVIDADE ADMIN --- */
@media (max-width: 768px) {
  #navbar {
    flex-direction: column;
    height: auto;
    padding: 15px;
    gap: 15px;
  }

  .nav-logo {
    margin-bottom: 5px;
  }

  /* Status da Loja no Mobile (Admin) */
  #navbar > div:nth-child(2) {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 5px !important;
    margin: 5px 0;
  }
  
  #navbar button {
    font-size: 0.7rem !important;
    padding: 6px 8px !important;
    min-width: 60px !important;
    flex: 1; /* Botões ocupam espaço igual */
    max-width: 100px;
  }


  #admin-container {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    padding: 10px 0;
    overflow-x: auto;
    border-bottom: 1px solid #333;
  }

  #sidebar ul {
    display: flex;
    padding: 0 10px;
  }

  #sidebar ul li {
    padding: 10px 15px;
    white-space: nowrap;
    font-size: 0.85rem;
  }

  #admin-main {
    padding: 20px 15px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .admin-header h2 {
    font-size: 1.4rem;
  }

  /* Forçar scroll horizontal em tabelas */
  .card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 600px;
  }

  /* Cards de Relatórios */
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}